pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: pg_combinebackup: Error if incremental file exists in full backu 2+ messages / 1 participants [nested] [flat]
* pgsql: pg_combinebackup: Error if incremental file exists in full backu @ 2024-11-04 15:26 Robert Haas <rhaas@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Robert Haas @ 2024-11-04 15:26 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_combinebackup: Error if incremental file exists in full backup. Suppose that you run a command like "pg_combinebackup b1 b2 -o output", but both b1 and b2 contain an INCREMENTAL.$something file in a directory that is expected to contain relation files. This is an error, but the previous code would not detect the problem and instead write a garbage full file named $something to the output directory. This commit adds code to detect the error and a test case to verify the behavior. It's difficult to imagine that this will ever happen unless someone is intentionally trying to break incremental backup, but per discussion, let's consider that the lack of adequate sanity checking in this area is a bug and back-patch to v17, where incremental backup was introduced. Patch by me, reviewed by Bertrand Drouvot and Amul Sul. Discussion: http://postgr.es/m/CA+TgmoaD7dBYPqe7kMtO0dyto7rd0rUh7joh=JPUSaFszKY6Pg@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/0b1765d959508050dba023099e36325cfeec3ff9 Modified Files -------------- src/bin/pg_combinebackup/meson.build | 1 + src/bin/pg_combinebackup/reconstruct.c | 8 ++++ src/bin/pg_combinebackup/t/009_no_full_file.pl | 66 ++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: pg_combinebackup: Error if incremental file exists in full backu @ 2024-11-04 15:26 Robert Haas <rhaas@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Robert Haas @ 2024-11-04 15:26 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_combinebackup: Error if incremental file exists in full backup. Suppose that you run a command like "pg_combinebackup b1 b2 -o output", but both b1 and b2 contain an INCREMENTAL.$something file in a directory that is expected to contain relation files. This is an error, but the previous code would not detect the problem and instead write a garbage full file named $something to the output directory. This commit adds code to detect the error and a test case to verify the behavior. It's difficult to imagine that this will ever happen unless someone is intentionally trying to break incremental backup, but per discussion, let's consider that the lack of adequate sanity checking in this area is a bug and back-patch to v17, where incremental backup was introduced. Patch by me, reviewed by Bertrand Drouvot and Amul Sul. Discussion: http://postgr.es/m/CA+TgmoaD7dBYPqe7kMtO0dyto7rd0rUh7joh=JPUSaFszKY6Pg@mail.gmail.com Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e367114429e09696fce01dd6f256e58a2c858734 Modified Files -------------- src/bin/pg_combinebackup/meson.build | 1 + src/bin/pg_combinebackup/reconstruct.c | 8 ++++ src/bin/pg_combinebackup/t/009_no_full_file.pl | 66 ++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-11-04 15:26 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-11-04 15:26 pgsql: pg_combinebackup: Error if incremental file exists in full backu Robert Haas <rhaas@postgresql.org> 2024-11-04 15:26 pgsql: pg_combinebackup: Error if incremental file exists in full backu Robert Haas <rhaas@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox