pgsql: Use the AddFile function consistently in MSVC build scripts

2021-07-28 Thread David Rowley
Use the AddFile function consistently in MSVC build scripts We seem to be using a mix of manually adding to the 'files' hash and calling the Addfile() method. Let's just consistently use AddFile(). Reviewed-by: Dagfinn Ilmari Mannsåker Discussion: https://postgr.es/m/CAApHDvpo6g5csCTjc_0C7DMvgF

pgsql: Disallow negative strides in date_bin()

2021-07-28 Thread John Naylor
Disallow negative strides in date_bin() It's not clear what the semantics of negative strides would be, so throw an error instead. Per report from Bauyrzhan Sakhariyev Reviewed-by: Tom Lane, Michael Paquier Discussion: https://www.postgresql.org/message-id/CAKpL73vZmLuFVuwF26FJ%2BNk11PVHhAnQRoR

pgsql: Disallow negative strides in date_bin()

2021-07-28 Thread John Naylor
Disallow negative strides in date_bin() It's not clear what the semantics of negative strides would be, so throw an error instead. Per report from Bauyrzhan Sakhariyev Reviewed-by: Tom Lane, Michael Paquier Discussion: https://www.postgresql.org/message-id/CAKpL73vZmLuFVuwF26FJ%2BNk11PVHhAnQRoR

pgsql: Update minimum recovery point on truncation during WAL replay of

2021-07-28 Thread Fujii Masao
Update minimum recovery point on truncation during WAL replay of abort record. If a file is truncated, we must update minRecoveryPoint. Once a file is truncated, there's no going back; it would not be safe to stop recovery at a point earlier than that anymore. Commit 7bffc9b7bf changed xact_redo_

pgsql: Update minimum recovery point on truncation during WAL replay of

2021-07-28 Thread Fujii Masao
Update minimum recovery point on truncation during WAL replay of abort record. If a file is truncated, we must update minRecoveryPoint. Once a file is truncated, there's no going back; it would not be safe to stop recovery at a point earlier than that anymore. Commit 7bffc9b7bf changed xact_redo_

pgsql: Update minimum recovery point on truncation during WAL replay of

2021-07-28 Thread Fujii Masao
Update minimum recovery point on truncation during WAL replay of abort record. If a file is truncated, we must update minRecoveryPoint. Once a file is truncated, there's no going back; it would not be safe to stop recovery at a point earlier than that anymore. Commit 7bffc9b7bf changed xact_redo_

pgsql: Update minimum recovery point on truncation during WAL replay of

2021-07-28 Thread Fujii Masao
Update minimum recovery point on truncation during WAL replay of abort record. If a file is truncated, we must update minRecoveryPoint. Once a file is truncated, there's no going back; it would not be safe to stop recovery at a point earlier than that anymore. Commit 7bffc9b7bf changed xact_redo_

pgsql: Update minimum recovery point on truncation during WAL replay of

2021-07-28 Thread Fujii Masao
Update minimum recovery point on truncation during WAL replay of abort record. If a file is truncated, we must update minRecoveryPoint. Once a file is truncated, there's no going back; it would not be safe to stop recovery at a point earlier than that anymore. Commit 7bffc9b7bf changed xact_redo_

pgsql: Update minimum recovery point on truncation during WAL replay of

2021-07-28 Thread Fujii Masao
Update minimum recovery point on truncation during WAL replay of abort record. If a file is truncated, we must update minRecoveryPoint. Once a file is truncated, there's no going back; it would not be safe to stop recovery at a point earlier than that anymore. Commit 7bffc9b7bf changed xact_redo_

pgsql: Update minimum recovery point on truncation during WAL replay of

2021-07-28 Thread Fujii Masao
Update minimum recovery point on truncation during WAL replay of abort record. If a file is truncated, we must update minRecoveryPoint. Once a file is truncated, there's no going back; it would not be safe to stop recovery at a point earlier than that anymore. Commit 7bffc9b7bf changed xact_redo_

pgsql: Make the includes field an array in MSVC build scripts

2021-07-28 Thread David Rowley
Make the includes field an array in MSVC build scripts Previously the 'includes' field was a string. It's slightly nicer to manage this when it's defined as an array instead. This allows us to more easily detect and eliminate duplicates. Reviewed-by: Álvaro Herrera, Andrew Dunstan, Dagfinn Ilmar

pgsql: Don't duplicate references and libraries in MSVC scripts

2021-07-28 Thread David Rowley
Don't duplicate references and libraries in MSVC scripts In order not to duplicate references and libraries in the Visual Studio project files produced by the MSVC build scripts, have them check if a particular reference or library already exists before adding the same one again. Reviewed-by: Álv

pgsql: Adjust MSVC build scripts to parse Makefiles for defines

2021-07-28 Thread David Rowley
Adjust MSVC build scripts to parse Makefiles for defines This adjusts the MSVC build scripts to look at the compile flags mentioned in the Makefile to look for -D arguments in order to determine which constants should be defined in Visual Studio builds. One small anomaly that appeared as a result

pgsql: Add missing exit() in pg_verifybackup when failing to find pg_wa

2021-07-28 Thread Michael Paquier
Add missing exit() in pg_verifybackup when failing to find pg_waldump pg_verifybackup needs by default pg_waldump to check after a range of WAL segments required for a backup, except if --no-parse-wal is specified. The code checked for the presence of the binary pg_waldump in an installation and

pgsql: Add missing exit() in pg_verifybackup when failing to find pg_wa

2021-07-28 Thread Michael Paquier
Add missing exit() in pg_verifybackup when failing to find pg_waldump pg_verifybackup needs by default pg_waldump to check after a range of WAL segments required for a backup, except if --no-parse-wal is specified. The code checked for the presence of the binary pg_waldump in an installation and

pgsql: Add missing exit() in pg_verifybackup when failing to find pg_wa

2021-07-28 Thread Michael Paquier
Add missing exit() in pg_verifybackup when failing to find pg_waldump pg_verifybackup needs by default pg_waldump to check after a range of WAL segments required for a backup, except if --no-parse-wal is specified. The code checked for the presence of the binary pg_waldump in an installation and

pgsql: Add some missing exit() calls in error paths for various binarie

2021-07-28 Thread Michael Paquier
Add some missing exit() calls in error paths for various binaries The following changes are done: - In pg_archivecleanup, the cleanup of older WAL segments would never fail immediately. - In pgbench, the initialization of a thread barrier would not fail hard. - In pg_recvlogical, a stat() failure

pgsql: Fix typo in tab-complete.c

2021-07-28 Thread Michael Paquier
Fix typo in tab-complete.c Introduced in b048326. Reported-by: Jeff Davis Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/15c6ede04577f856f702bf0a032297de667f382a Modified