Skip to content

[#1741] Import full WAL-G backups with pgmoneta-muse - #1765

Open
manishpatel00 wants to merge 1 commit into
pgmoneta:mainfrom
manishpatel00:codex/1741-walg
Open

manishpatel00 wants to merge 1 commit into
pgmoneta:mainfrom
manishpatel00:codex/1741-walg

Conversation

@manishpatel00

@manishpatel00 manishpatel00 commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Refs #1741

Description

Import a named full backup directly from a local WAL-G repository, including the WAL needed through the backup end LSN. Production migration does not invoke WAL-G. Source support is limited to unencrypted LZ4/Zstandard backups without incremental chains or external tablespaces.

Validate completion metadata, partition ordering, required PostgreSQL files and recovery WAL before publishing the staged backup. Reject unsafe archive entries and clean up unsuccessful imports.

Testing

The integration script is registered as CTest muse_walg and runs in the added WAL-G migration workflow. WAL-G generates source repositories only; a failing executable guard verifies that migration does not invoke it.

Remote validation passed with PostgreSQL 16 and WAL-G 3.0.10: GCC Debug build, importer cppcheck analysis, LZ4/Zstandard import, pg_verifybackup, pgmoneta restore, PostgreSQL startup and known-row verification. Negative cases cover duplicate imports, missing WAL/partitions, malformed metadata, incremental/tablespace inputs, invalid archives, oversized members and path/symlink attacks.

clang-format 21, whitespace and shell syntax checks passed after a whitespace-only correction.

Full upstream CI for this updated commit has not yet been verified. No local build was run.

@ecleon26 ecleon26 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As discussed in #1741 - read the WAL-G repository format directly, like migration_pgbackrest.c. Only use wal-g in the test to create the source repository

Comment thread test/muse-walg.sh Resolved
…ories

Read completion metadata, compressed tar partitions and recovery WAL
without invoking WAL-G. Validate and stage imports before publication.
Register real LZ4/Zstandard restore and negative cases in CTest and CI.

Refs pgmoneta#1741

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Signed-off-by: Manish Kumar <[email protected]>
@manishpatel00

Copy link
Copy Markdown
Contributor Author

@ecleon26 Addressed in 82743ee. Production migration now reads the local WAL-G repository directly; wal-g is used only to generate test repositories. The integration test is registered with CTest and runs in CI. LZ4/Zstandard import, pg_verifybackup, pgmoneta restore, PostgreSQL startup, known-row verification and negative cases passed on PostgreSQL 16/WAL-G 3.0.10. clang-format 21 and whitespace checks also passed. Rebased and squashed to one signed-off commit; validation links and supported scope are in the updated description.

@manishpatel00

Copy link
Copy Markdown
Contributor Author

Fixed the GCC Release -Werror=maybe-uninitialized failure in collect_tar_parts() by initializing the partition number. The existing partition sequence validation remains unchanged. Updated commit: 0de3fa1; the PR remains one signed-off commit on current main. Verified the remote tree differs from the previous revision by this one-line change only.

New CI is queued: https://github.com/pgmoneta/pgmoneta/actions/runs/47052222924 . The previous Clang Debug 18 failure reported that the hosted runner lost communication; it did not provide a compiler failure. Build success for the new revision is not yet verified.

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.

2 participants