aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2024-11-04 10:11:05 -0500
committerRobert Haas <rhaas@postgresql.org>2024-11-04 10:11:05 -0500
commit0b1765d959508050dba023099e36325cfeec3ff9 (patch)
tree9268b257a2f590f1ba99e8fe8384d1381262b9c2 /src/backend/tcop/postgres.c
parent6c24801b1717ff68695647068a5ad8ff88f7639d (diff)
downloadpostgresql-0b1765d959508050dba023099e36325cfeec3ff9.tar.gz
postgresql-0b1765d959508050dba023099e36325cfeec3ff9.zip
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
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions