Skip to content

Comments

Fix gpexpand not changing content-id for wal-g cmd#357

Merged
NJrslv merged 1 commit intoOPENGPDB_STABLEfrom
fix-gpexpand-wal-g-conf
Feb 17, 2026
Merged

Fix gpexpand not changing content-id for wal-g cmd#357
NJrslv merged 1 commit intoOPENGPDB_STABLEfrom
fix-gpexpand-wal-g-conf

Conversation

@NJrslv
Copy link
Contributor

@NJrslv NJrslv commented Feb 17, 2026

When expanding a cluster, gpexpand copies the postgresql.conf file directly from the template segment (content 0). This causes issues for tools like wal-g which use a --content-id flag in archive_command and restore_command_hint.

Previously, new segments inherited --content-id=0 from the template. This caused them to push WAL segments to the wrong location, potentially overwriting segment 0's segments.

This fix ensures the content ID in archive_command and restore_command_hint is updated to match the new segment's ID during expansion. If the commands do not contain the --content-id flag, they remain unchanged.

When expanding a cluster, gpexpand copies the postgresql.conf file directly
from the template segment (content 0). This causes issues for tools like
wal-g which use a --content-id flag in archive_command and
restore_command_hint.

Previously, new segments inherited --content-id=0 from the template.
This caused them to push WAL segments to the wrong location, potentially
overwriting segment 0's segments.

This fix ensures the content ID in archive_command and restore_command_hint
is updated to match the new segment's ID during expansion. If the commands
do not contain the --content-id flag, they remain unchanged.
Copy link
Contributor

@ostinru ostinru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

visill
visill previously requested changes Feb 17, 2026
Copy link
Contributor

@visill visill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test out is bad.

@NJrslv NJrslv requested a review from visill February 17, 2026 08:49
@NJrslv NJrslv dismissed visill’s stale review February 17, 2026 09:23

the test is fine :)

@NJrslv NJrslv merged commit 8d8bbd7 into OPENGPDB_STABLE Feb 17, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants