pgsql: Improve memory handling across SQL-callable backup functions

2022-10-21 Thread Michael Paquier
Improve memory handling across SQL-callable backup functions Since pg_backup_start() and pg_backup_stop() exist, the tablespace map data and the backup state data (backup_label string until 7d70809) have been allocated in the TopMemoryContext. This approach would cause memory leaks in the session

pgsql: pg_basebackup: Fix cross-platform tablespace relocation.

2022-10-21 Thread Robert Haas
pg_basebackup: Fix cross-platform tablespace relocation. Specifically, when pg_basebackup is invoked with -Tx=y, don't error out if x could plausibly be an absolute path either on Windows or on non-Windows systems. We don't know whether the remote system is running the same OS as the local system,

pgsql: pg_basebackup: Fix cross-platform tablespace relocation.

2022-10-21 Thread Robert Haas
pg_basebackup: Fix cross-platform tablespace relocation. Specifically, when pg_basebackup is invoked with -Tx=y, don't error out if x could plausibly be an absolute path either on Windows or on non-Windows systems. We don't know whether the remote system is running the same OS as the local system,

pgsql: pg_basebackup: Fix cross-platform tablespace relocation.

2022-10-21 Thread Robert Haas
pg_basebackup: Fix cross-platform tablespace relocation. Specifically, when pg_basebackup is invoked with -Tx=y, don't error out if x could plausibly be an absolute path either on Windows or on non-Windows systems. We don't know whether the remote system is running the same OS as the local system,

pgsql: pg_basebackup: Fix cross-platform tablespace relocation.

2022-10-21 Thread Robert Haas
pg_basebackup: Fix cross-platform tablespace relocation. Specifically, when pg_basebackup is invoked with -Tx=y, don't error out if x could plausibly be an absolute path either on Windows or on non-Windows systems. We don't know whether the remote system is running the same OS as the local system,

pgsql: pg_basebackup: Fix cross-platform tablespace relocation.

2022-10-21 Thread Robert Haas
pg_basebackup: Fix cross-platform tablespace relocation. Specifically, when pg_basebackup is invoked with -Tx=y, don't error out if x could plausibly be an absolute path either on Windows or on non-Windows systems. We don't know whether the remote system is running the same OS as the local system,

pgsql: pg_basebackup: Fix cross-platform tablespace relocation.

2022-10-21 Thread Robert Haas
pg_basebackup: Fix cross-platform tablespace relocation. Specifically, when pg_basebackup is invoked with -Tx=y, don't error out if x could plausibly be an absolute path either on Windows or on non-Windows systems. We don't know whether the remote system is running the same OS as the local system,

pgsql: pg_basebackup: Fix cross-platform tablespace relocation.

2022-10-21 Thread Robert Haas
pg_basebackup: Fix cross-platform tablespace relocation. Specifically, when pg_basebackup is invoked with -Tx=y, don't error out if x could plausibly be an absolute path either on Windows or on non-Windows systems. We don't know whether the remote system is running the same OS as the local system,

pgsql: Add CHECK_FOR_INTERRUPTS while restoring changes during decoding

2022-10-21 Thread Amit Kapila
Add CHECK_FOR_INTERRUPTS while restoring changes during decoding. Previously in commit 42681dffaf, we added CFI during decoding changes but missed another similar case that can happen while restoring changes spilled to disk back into memory in a loop. Reported-by: Robert Haas Author: Amit Kapila

pgsql: Add CHECK_FOR_INTERRUPTS while restoring changes during decoding

2022-10-21 Thread Amit Kapila
Add CHECK_FOR_INTERRUPTS while restoring changes during decoding. Previously in commit 42681dffaf, we added CFI during decoding changes but missed another similar case that can happen while restoring changes spilled to disk back into memory in a loop. Reported-by: Robert Haas Author: Amit Kapila

pgsql: Add CHECK_FOR_INTERRUPTS while restoring changes during decoding

2022-10-21 Thread Amit Kapila
Add CHECK_FOR_INTERRUPTS while restoring changes during decoding. Previously in commit 42681dffaf, we added CFI during decoding changes but missed another similar case that can happen while restoring changes spilled to disk back into memory in a loop. Reported-by: Robert Haas Author: Amit Kapila

pgsql: Add CHECK_FOR_INTERRUPTS while restoring changes during decoding

2022-10-21 Thread Amit Kapila
Add CHECK_FOR_INTERRUPTS while restoring changes during decoding. Previously in commit 42681dffaf, we added CFI during decoding changes but missed another similar case that can happen while restoring changes spilled to disk back into memory in a loop. Reported-by: Robert Haas Author: Amit Kapila

pgsql: Add CHECK_FOR_INTERRUPTS while restoring changes during decoding

2022-10-21 Thread Amit Kapila
Add CHECK_FOR_INTERRUPTS while restoring changes during decoding. Previously in commit 42681dffaf, we added CFI during decoding changes but missed another similar case that can happen while restoring changes spilled to disk back into memory in a loop. Reported-by: Robert Haas Author: Amit Kapila

pgsql: Add CHECK_FOR_INTERRUPTS while restoring changes during decoding

2022-10-21 Thread Amit Kapila
Add CHECK_FOR_INTERRUPTS while restoring changes during decoding. Previously in commit 42681dffaf, we added CFI during decoding changes but missed another similar case that can happen while restoring changes spilled to disk back into memory in a loop. Reported-by: Robert Haas Author: Amit Kapila

pgsql: Add CHECK_FOR_INTERRUPTS while restoring changes during decoding

2022-10-21 Thread Amit Kapila
Add CHECK_FOR_INTERRUPTS while restoring changes during decoding. Previously in commit 42681dffaf, we added CFI during decoding changes but missed another similar case that can happen while restoring changes spilled to disk back into memory in a loop. Reported-by: Robert Haas Author: Amit Kapila