pgsql: Add a common function to generate the origin name.

2022-10-10 Thread Amit Kapila
Add a common function to generate the origin name. Make a common replication origin name formatting function to replace multiple snprintf() expressions. This also includes logic previously done by ReplicationOriginNameForTablesync(). This makes the code to generate the origin name consistent

pgsql: Add TAP tests for role membership in pg_hba.conf

2022-10-10 Thread Michael Paquier
Add TAP tests for role membership in pg_hba.conf This commit expands the coverage of pg_hba.conf with checks specific to role memberships (one "root" role combined with a member and a non-member). Coverage is added for the database keywords "samegroup" and "samerole", where the specified role

pgsql: Add support for COPY TO callback functions

2022-10-10 Thread Michael Paquier
Add support for COPY TO callback functions This is useful as a way for extensions to process COPY TO rows in the way they see fit (say auditing, analytics, backend, etc.) without the need to invoke an external process running as the OS user running the backend through PROGRAM that requires

pgsql: Harden memory context allocators against bogus chunk pointers.

2022-10-10 Thread Tom Lane
Harden memory context allocators against bogus chunk pointers. Before commit c6e0fe1f2, functions such as AllocSetFree could pretty safely presume that they were given a valid chunk pointer for their own type of context, because the indirect call through a memory context object and method struct

pgsql: Doc: update release date for v15.

2022-10-10 Thread Tom Lane
Doc: update release date for v15. Drat, forgot this ... Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/2a7ce2e2ce474504a707ec03e128fde66cfb8b48 Modified Files -- doc/src/sgml/release-15.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Stamp 15.0.

2022-10-10 Thread Tom Lane
Stamp 15.0. Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/957d1993c13d8477a3db5e319ece845fb3e0e5a7 Modified Files -- configure| 18 +- configure.ac | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-)

pgsql: Simplify our Assert infrastructure a little.

2022-10-10 Thread Tom Lane
Simplify our Assert infrastructure a little. Remove the Trap and TrapMacro macros, which were nearly unused and confusingly had the opposite condition polarity from the otherwise-functionally-equivalent Assert macros. Having done that, it's very hard to justify carrying the errorType argument of

pgsql: Translation updates

2022-10-10 Thread Peter Eisentraut
Translation updates Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git Source-Git-Hash: 59f93a503842f7c06b4ea5d022397ab3c2a0acd2 Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/77d500abb8a112df81486b1a717d3dd09479070e Modified Files

pgsql: Remove unnecessary semicolons after goto labels

2022-10-10 Thread John Naylor
Remove unnecessary semicolons after goto labels According to the C standard, a label must followed by a statement. If there was ever a time we needed an empty statement here, it was a long time ago. Japin Li Reviewed by Julien Rouhaud Discussion:

pgsql: Use C library functions instead of Abs() for int64

2022-10-10 Thread Peter Eisentraut
Use C library functions instead of Abs() for int64 Instead of Abs() for int64, use the C standard functions labs() or llabs() as appropriate. Define a small wrapper around them that matches our definition of int64. (labs() is C90, llabs() is C99.) Reviewed-by: Zhang Mingli Reviewed-by: Tom

pgsql: Update list of acknowledgments in release notes

2022-10-10 Thread Peter Eisentraut
Update list of acknowledgments in release notes current through c3b5992b91c4b0d2c4f4eab0fb856f34854c129d Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/48c81b57e942075f40702787f14acb2451871b4f Modified Files -- doc/src/sgml/release-15.sgml | 2