pgsql: Check return of pg_b64_encode() for error

2025-01-15 Thread Peter Eisentraut
Check return of pg_b64_encode() for error Forgotten in commit 761c79508e7. Author: Ranier Vilela Discussion: https://www.postgresql.org/message-id/flat/CAEudQAq-3yHsSdWoOOaw%2BgAQYgPMpMGuB5pt2yCXgv-YuxG2Hg%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/com

pgsql: Doc: Improve the Replica Identity information.

2025-01-15 Thread Amit Kapila
Doc: Improve the Replica Identity information. This commit improves the Replica Identity information and clarifies its related restrictions. Reported-by: James Coleman Author: Peter Smith Co-authored-by: Robert Treat Reviewed-by: Laurenz Albe, Amit Kapila Discussion: https://postgr.es/m/CAAaqYe_

pgsql: Move routines to manipulate WAL into PostgreSQL::Test::Cluster

2025-01-15 Thread Michael Paquier
Move routines to manipulate WAL into PostgreSQL::Test::Cluster These facilities were originally in the recovery TAP test 039_end_of_wal.pl. A follow-up bug fix with a TAP test doing similar WAL manipulations requires them, and all these had better not be duplicated due to their complexity. The r

pgsql: Move routines to manipulate WAL into PostgreSQL::Test::Cluster

2025-01-15 Thread Michael Paquier
Move routines to manipulate WAL into PostgreSQL::Test::Cluster These facilities were originally in the recovery TAP test 039_end_of_wal.pl. A follow-up bug fix with a TAP test doing similar WAL manipulations requires them, and all these had better not be duplicated due to their complexity. The r

pgsql: Move routines to manipulate WAL into PostgreSQL::Test::Cluster

2025-01-15 Thread Michael Paquier
Move routines to manipulate WAL into PostgreSQL::Test::Cluster These facilities were originally in the recovery TAP test 039_end_of_wal.pl. A follow-up bug fix with a TAP test doing similar WAL manipulations requires them, and all these had better not be duplicated due to their complexity. The r

pgsql: Move routines to manipulate WAL into PostgreSQL::Test::Cluster

2025-01-15 Thread Michael Paquier
Move routines to manipulate WAL into PostgreSQL::Test::Cluster These facilities were originally in the recovery TAP test 039_end_of_wal.pl. A follow-up bug fix with a TAP test doing similar WAL manipulations requires them, and all these had better not be duplicated due to their complexity. The r

pgsql: Move routines to manipulate WAL into PostgreSQL::Test::Cluster

2025-01-15 Thread Michael Paquier
Move routines to manipulate WAL into PostgreSQL::Test::Cluster These facilities were originally in the recovery TAP test 039_end_of_wal.pl. A follow-up bug fix with a TAP test doing similar WAL manipulations requires them, and all these had better not be duplicated due to their complexity. The r

pgsql: Move routines to manipulate WAL into PostgreSQL::Test::Cluster

2025-01-15 Thread Michael Paquier
Move routines to manipulate WAL into PostgreSQL::Test::Cluster These facilities were originally in the recovery TAP test 039_end_of_wal.pl. A follow-up bug fix with a TAP test doing similar WAL manipulations requires them, and all these had better not be duplicated due to their complexity. The r

Re: pgsql: Change gist stratnum function to use CompareType

2025-01-15 Thread Peter Eisentraut
On 15.01.25 22:36, Melanie Plageman wrote: On Wed, Jan 15, 2025 at 5:41 AM Peter Eisentraut wrote: Change gist stratnum function to use CompareType This changes commit 7406ab623fe in that the gist strategy number mapping support function is changed to use the CompareType enum as input, instea

pgsql: Fix cpluspluscheck for "Change gist stratnum function to use Com

2025-01-15 Thread Peter Eisentraut
Fix cpluspluscheck for "Change gist stratnum function to use CompareType" Commit 630f9a43cec introduced an enum forward declaration, which doesn't work in C++. To fix, just include the header file to get the type. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d52

Re: pgsql: Change gist stratnum function to use CompareType

2025-01-15 Thread Melanie Plageman
On Wed, Jan 15, 2025 at 5:41 AM Peter Eisentraut wrote: > > Change gist stratnum function to use CompareType > > This changes commit 7406ab623fe in that the gist strategy number > mapping support function is changed to use the CompareType enum as > input, instead of the "well-known" RT*StrategyNum

pgsql: Add more general summary to vacuumlazy.c

2025-01-15 Thread Melanie Plageman
Add more general summary to vacuumlazy.c Add more comments at the top of vacuumlazy.c on heap relation vacuuming implementation. Previously vacuumlazy.c only had details related to dead TID storage. This commit adds a more general summary to help future developers understand the heap relation vac

pgsql: IWYU pragmas for catalog headers

2025-01-15 Thread Peter Eisentraut
IWYU pragmas for catalog headers Add "IWYU pragma: export" annotations in each catalog header file so that, for instance, including "catalog/pg_aggregate.h" is considered acceptable in place of "catalog/pg_aggregate_d.h". This is very common and it seems better to silence IWYU about it than tryin

pgsql: Add a bit of documentation related to IWYU

2025-01-15 Thread Peter Eisentraut
Add a bit of documentation related to IWYU Add some basic information about IWYU to src/tools/pginclude/README. Discussion: https://www.postgresql.org/message-id/flat/9395d484-eff4-47c2-b276-8e228526c...@eisentraut.org Branch -- master Details --- https://git.postgresql.org/pg/commitdi

pgsql: IWYU widely useful pragmas

2025-01-15 Thread Peter Eisentraut
IWYU widely useful pragmas Add various widely useful "IWYU pragma" annotations, such as - Common header files such as c.h, postgres.h should be "always_keep". - System headers included in c.h, postgres.h etc. should be considered "export". - Some portability headers such as getopt_long.h shou

pgsql: postgres_fdw: SCRAM authentication pass-through

2025-01-15 Thread Peter Eisentraut
postgres_fdw: SCRAM authentication pass-through This enables SCRAM authentication for postgres_fdw when connecting to a foreign server without having to store a plain-text password on user mapping options. This is done by saving the SCRAM ClientKey and ServeryKey from the client authentication an

pgsql: Downgrade errors in object_ownercheck() to internal

2025-01-15 Thread Peter Eisentraut
Downgrade errors in object_ownercheck() to internal The "does not exist" errors in object_ownership() were written as ereport(), suggesting that they are user-facing. But no code path except one can reach this function without first checking that the object exists. If this were actually a user-f

pgsql: Downgrade error in object_aclmask_ext() to internal

2025-01-15 Thread Peter Eisentraut
Downgrade error in object_aclmask_ext() to internal The "does not exist" error in object_aclmask_ext() was written as ereport(), suggesting that it is user-facing. This is problematic: get_object_class_descr() is meant to be for internal errors only and does not support translation. For the has_

pgsql: Drop warning-free support for Flex 2.5.35

2025-01-15 Thread Peter Eisentraut
Drop warning-free support for Flex 2.5.35 This removes all the various workarounds for avoiding compiler warnings with Flex 2.5.35. Several recent patches have added additional warnings that would either need to be fixed along the lines of the existing workarounds, or we decide to no longer care

pgsql: Change gist stratnum function to use CompareType

2025-01-15 Thread Peter Eisentraut
Change gist stratnum function to use CompareType This changes commit 7406ab623fe in that the gist strategy number mapping support function is changed to use the CompareType enum as input, instead of the "well-known" RT*StrategyNumber strategy numbers. This is a bit cleaner, since you are not deal