pgsql: Fix incorrect value for "strategy" with deflateParams() in walme

2022-09-13 Thread Michael Paquier
Fix incorrect value for "strategy" with deflateParams() in walmethods.c The zlib documentation mentions the values supported for the compression strategy, but this code has been using a hardcoded value of 0 rather than Z_DEFAULT_STRATEGY. This commit adjusts the code to use Z_DEFAULT_STRATEGY.

pgsql: Fix incorrect value for "strategy" with deflateParams() in walme

2022-09-13 Thread Michael Paquier
Fix incorrect value for "strategy" with deflateParams() in walmethods.c The zlib documentation mentions the values supported for the compression strategy, but this code has been using a hardcoded value of 0 rather than Z_DEFAULT_STRATEGY. This commit adjusts the code to use Z_DEFAULT_STRATEGY.

pgsql: Fix incorrect value for "strategy" with deflateParams() in walme

2022-09-13 Thread Michael Paquier
Fix incorrect value for "strategy" with deflateParams() in walmethods.c The zlib documentation mentions the values supported for the compression strategy, but this code has been using a hardcoded value of 0 rather than Z_DEFAULT_STRATEGY. This commit adjusts the code to use Z_DEFAULT_STRATEGY.

pgsql: Fix incorrect value for "strategy" with deflateParams() in walme

2022-09-13 Thread Michael Paquier
Fix incorrect value for "strategy" with deflateParams() in walmethods.c The zlib documentation mentions the values supported for the compression strategy, but this code has been using a hardcoded value of 0 rather than Z_DEFAULT_STRATEGY. This commit adjusts the code to use Z_DEFAULT_STRATEGY.

pgsql: Fix incorrect value for "strategy" with deflateParams() in walme

2022-09-13 Thread Michael Paquier
Fix incorrect value for "strategy" with deflateParams() in walmethods.c The zlib documentation mentions the values supported for the compression strategy, but this code has been using a hardcoded value of 0 rather than Z_DEFAULT_STRATEGY. This commit adjusts the code to use Z_DEFAULT_STRATEGY.

pgsql: Fix incorrect value for "strategy" with deflateParams() in walme

2022-09-13 Thread Michael Paquier
Fix incorrect value for "strategy" with deflateParams() in walmethods.c The zlib documentation mentions the values supported for the compression strategy, but this code has been using a hardcoded value of 0 rather than Z_DEFAULT_STRATEGY. This commit adjusts the code to use Z_DEFAULT_STRATEGY.

pgsql: Fix incorrect value for "strategy" with deflateParams() in walme

2022-09-13 Thread Michael Paquier
Fix incorrect value for "strategy" with deflateParams() in walmethods.c The zlib documentation mentions the values supported for the compression strategy, but this code has been using a hardcoded value of 0 rather than Z_DEFAULT_STRATEGY. This commit adjusts the code to use Z_DEFAULT_STRATEGY.

pgsql: Fix typo in pgbench.c.

2022-09-13 Thread Amit Kapila
Fix typo in pgbench.c. Author: Kyotaro Horiguchi Discussion: https://postgr.es/m/20220914.114608.1462991533784489178.horikyota@gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d583036d68d6fe2fa7facd63eb6548583094fa96 Modified Files --

pgsql: Bump minimum Perl version to 5.14

2022-09-13 Thread John Naylor
Bump minimum Perl version to 5.14 The oldest vendor-shipped Perl in the buildfarm is 5.14.2, which is the last version that Debian Wheezy shipped. That OS is EOL, but we keep it running because there is no other convenient way to test certain non-mainstream 32-bit platforms. There is no bugfix in

Re: pgsql: process startup: Remove bootstrap / checker modes from AuxProcTy

2022-09-13 Thread Andres Freund
Hi, On September 13, 2022 9:43:57 PM PDT, Peter Eisentraut wrote: >On 05.08.21 21:26, Andres Freund wrote: >> process startup: Remove bootstrap / checker modes from AuxProcType. >> >> Neither is actually initialized as an auxiliary process, so it does not >> really >> make sense to reserve a

Re: pgsql: process startup: Remove bootstrap / checker modes from AuxProcTy

2022-09-13 Thread Peter Eisentraut
On 05.08.21 21:26, Andres Freund wrote: process startup: Remove bootstrap / checker modes from AuxProcType. Neither is actually initialized as an auxiliary process, so it does not really make sense to reserve a PGPROC etc for them. This keeps checker mode implemented by exiting partway through

pgsql: Expand palloc/pg_malloc API for more type safety

2022-09-13 Thread Peter Eisentraut
Expand palloc/pg_malloc API for more type safety This adds additional variants of palloc, pg_malloc, etc. that encapsulate common usage patterns and provide more type safety. Specifically, this adds palloc_object(), palloc_array(), and repalloc_array(), which take the type name of the object to

pgsql: Expand palloc/pg_malloc API for more type safety

2022-09-13 Thread Peter Eisentraut
Expand palloc/pg_malloc API for more type safety This adds additional variants of palloc, pg_malloc, etc. that encapsulate common usage patterns and provide more type safety. Specifically, this adds palloc_object(), palloc_array(), and repalloc_array(), which take the type name of the object to

pgsql: Expand palloc/pg_malloc API for more type safety

2022-09-13 Thread Peter Eisentraut
Expand palloc/pg_malloc API for more type safety This adds additional variants of palloc, pg_malloc, etc. that encapsulate common usage patterns and provide more type safety. Specifically, this adds palloc_object(), palloc_array(), and repalloc_array(), which take the type name of the object to

pgsql: Expand palloc/pg_malloc API for more type safety

2022-09-13 Thread Peter Eisentraut
Expand palloc/pg_malloc API for more type safety This adds additional variants of palloc, pg_malloc, etc. that encapsulate common usage patterns and provide more type safety. Specifically, this adds palloc_object(), palloc_array(), and repalloc_array(), which take the type name of the object to

pgsql: Expand palloc/pg_malloc API for more type safety

2022-09-13 Thread Peter Eisentraut
Expand palloc/pg_malloc API for more type safety This adds additional variants of palloc, pg_malloc, etc. that encapsulate common usage patterns and provide more type safety. Specifically, this adds palloc_object(), palloc_array(), and repalloc_array(), which take the type name of the object to

pgsql: Expand palloc/pg_malloc API for more type safety

2022-09-13 Thread Peter Eisentraut
Expand palloc/pg_malloc API for more type safety This adds additional variants of palloc, pg_malloc, etc. that encapsulate common usage patterns and provide more type safety. Specifically, this adds palloc_object(), palloc_array(), and repalloc_array(), which take the type name of the object to

pgsql: Move gramparse.h to src/backend/parser

2022-09-13 Thread John Naylor
Move gramparse.h to src/backend/parser This header is semi-private, being used only in files related to raw parsing, so move to the backend directory where those files live. This allows removal of Makefile rules that symlink gram.h to src/include/parser, since gramparse.h can now include gram.h

pgsql: Simplify handling of compression level with compression specific

2022-09-13 Thread Michael Paquier
Simplify handling of compression level with compression specifications PG_COMPRESSION_OPTION_LEVEL is removed from the compression specification logic, and instead the compression level is always assigned with each library's default if nothing is directly given. This centralizes the checks on

pgsql: Simplify handling of compression level with compression specific

2022-09-13 Thread Michael Paquier
Simplify handling of compression level with compression specifications PG_COMPRESSION_OPTION_LEVEL is removed from the compression specification logic, and instead the compression level is always assigned with each library's default if nothing is directly given. This centralizes the checks on

Re: pgsql: aix: No need to use mkldexport when we want to export all symbol

2022-09-13 Thread Tom Lane
Andres Freund writes: > So we could work around the xlc 12.1 issue with something like the attached > patch. It passes at some of the tests, with both 32 and 64bit xlc 12.1, will > have to wait a while to see more Shouldn't that be more like + if test

Re: pgsql: aix: No need to use mkldexport when we want to export all symbol

2022-09-13 Thread Andres Freund
Hi, On 2022-09-13 11:25:30 -0700, Andres Freund wrote: > On 2022-09-11 11:19:25 -0700, Andres Freund wrote: > > We could also try to fall back to using -Wl,b,expall for extension modules. > > expall doesn't work, because of our use of identifiers in reserved namespaces, > e.g. _PG_init: > >

Re: pgsql: Fix perltidy breaking perlcritic

2022-09-13 Thread Andrew Dunstan
On 2022-09-13 Tu 05:25, John Naylor wrote: > On Mon, Sep 12, 2022 at 4:54 PM Dagfinn Ilmari Mannsåker > wrote: > >>> eval "\$hash_ref = $_"; ## no critic (ProhibitStringyEval) >> I didn't see this until it got committed, since I'm not subscribed to >> -committers, but I think it would be even

Re: pgsql: aix: No need to use mkldexport when we want to export all symbol

2022-09-13 Thread Andres Freund
Hi, On 2022-09-11 11:19:25 -0700, Andres Freund wrote: > We could also try to fall back to using -Wl,b,expall for extension modules. expall doesn't work, because of our use of identifiers in reserved namespaces, e.g. _PG_init: expall Exports all global symbols, except

pgsql: Split up guc.c for better build speed and ease of maintenance.

2022-09-13 Thread Tom Lane
Split up guc.c for better build speed and ease of maintenance. guc.c has grown to be one of our largest .c files, making it a bottleneck for compilation. It's also acquired a bunch of knowledge that'd be better kept elsewhere, because of our not very good habit of putting variable-specific check

pgsql: pg_clean_ascii(): escape bytes rather than lose them

2022-09-13 Thread Peter Eisentraut
pg_clean_ascii(): escape bytes rather than lose them Rather than replace each unprintable byte with a '?' character, replace it with a hex escape instead. The API now allocates a copy rather than modifying the input in place. Author: Jacob Champion Discussion:

pgsql: Don't reflect unescaped cert data to the logs

2022-09-13 Thread Peter Eisentraut
Don't reflect unescaped cert data to the logs Commit 3a0e385048 introduced a new path for unauthenticated bytes from the client certificate to be printed unescaped to the logs. There are a handful of these already, but it doesn't make sense to keep making the problem worse. \x-escape any

pgsql: Make locale option behavior more consistent

2022-09-13 Thread Peter Eisentraut
Make locale option behavior more consistent Locale options can be specified for initdb, createdb, and CREATE DATABASE. In initdb, it has always been possible to specify --locale and then some --lc-* option to override a category. CREATE DATABASE and createdb didn't allow that, requiring either

pgsql: Make locale option behavior more consistent

2022-09-13 Thread Peter Eisentraut
Make locale option behavior more consistent Locale options can be specified for initdb, createdb, and CREATE DATABASE. In initdb, it has always been possible to specify --locale and then some --lc-* option to override a category. CREATE DATABASE and createdb didn't allow that, requiring either

pgsql: Improve wal_decode_buffer_size description some more

2022-09-13 Thread Alvaro Herrera
Improve wal_decode_buffer_size description some more Per Thomas Munro Discussion: https://postgr.es/m/CA+hUKGJ9wP9kpvgoxHvqA=4g1d9-y_w3LhhdhFVU=mfiqjw...@mail.gmail.com Branch -- REL_15_STABLE Details ---

pgsql: Improve wal_decode_buffer_size description some more

2022-09-13 Thread Alvaro Herrera
Improve wal_decode_buffer_size description some more Per Thomas Munro Discussion: https://postgr.es/m/CA+hUKGJ9wP9kpvgoxHvqA=4g1d9-y_w3LhhdhFVU=mfiqjw...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8e7a0b4a36741934d1350de5646efd2f3a10951e

pgsql: Remove useless pstrdups in untransformRelOptions

2022-09-13 Thread Alvaro Herrera
Remove useless pstrdups in untransformRelOptions The two strings are already a single palloc'd chunk, not freed; there's no reason to allocate separate copies that have the same lifetime. This code is only called in short-lived memory contexts (except in some cases in TopTransactionContext,

pgsql: Adjust header exceptions for 0bd9c6297

2022-09-13 Thread John Naylor
Adjust header exceptions for 0bd9c6297 Per buildfarm animal crake Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/fcf7b3a9d42c3cf778dab0fc644f11f12684d184 Modified Files -- src/tools/pginclude/cpluspluscheck | 2 +- src/tools/pginclude/headerscheck |

Re: pgsql: Fix perltidy breaking perlcritic

2022-09-13 Thread John Naylor
On Mon, Sep 12, 2022 at 4:54 PM Dagfinn Ilmari Mannsåker wrote: > > eval "\$hash_ref = $_"; ## no critic (ProhibitStringyEval) > > I didn't see this until it got committed, since I'm not subscribed to > -committers, but I think it would be even better to rely on the fact > that eval returns the

pgsql: Treat Unicode codepoints of category "Format" as non-spacing

2022-09-13 Thread John Naylor
Treat Unicode codepoints of category "Format" as non-spacing Commit d8594d123 updated the list of non-spacing codepoints used for calculating display width, but in doing so inadvertently removed some, since the script used for that commit only considered combining characters. For complete

Re: pgsql: aix: No need to use mkldexport when we want to export all symbol

2022-09-13 Thread Andres Freund
On 2022-09-13 00:15:55 -0700, Andres Freund wrote: > On 2022-09-12 23:39:04 -0700, Noah Misch wrote: > > On Mon, Sep 12, 2022 at 11:11:23PM -0700, Andres Freund wrote: > > > > > > -qvisibility option specifies visibility attributes for entities. > > > > > > Entity > > > > > > visibility

Re: pgsql: aix: No need to use mkldexport when we want to export all symbol

2022-09-13 Thread Andres Freund
Hi, On 2022-09-13 00:02:53 -0700, Andres Freund wrote: > On 2022-09-12 23:11:23 -0700, Andres Freund wrote: > > I'll check it out tomorrow. I configured perl on the other AIX gcc compile > > farm machine building 64bit with both gcc and xlc, IIRC. I can't check rn, > > they seem to be down? > >

Re: pgsql: aix: No need to use mkldexport when we want to export all symbol

2022-09-13 Thread Andres Freund
Hi, On 2022-09-12 23:39:04 -0700, Noah Misch wrote: > On Mon, Sep 12, 2022 at 11:11:23PM -0700, Andres Freund wrote: > > On 2022-09-12 20:38:45 -0700, Noah Misch wrote: > > > On Sun, Sep 11, 2022 at 11:19:25AM -0700, Andres Freund wrote: > > > Both runs had the latest commits discussed above.

Re: pgsql: aix: No need to use mkldexport when we want to export all symbol

2022-09-13 Thread Andres Freund
Hi, On 2022-09-12 23:11:23 -0700, Andres Freund wrote: > I'll check it out tomorrow. I configured perl on the other AIX gcc compile > farm machine building 64bit with both gcc and xlc, IIRC. I can't check rn, > they seem to be down? Seems to just have been a temporary connectivity issue. After

Re: pgsql: aix: No need to use mkldexport when we want to export all symbol

2022-09-13 Thread Noah Misch
On Mon, Sep 12, 2022 at 11:11:23PM -0700, Andres Freund wrote: > On 2022-09-12 20:38:45 -0700, Noah Misch wrote: > > On Sun, Sep 11, 2022 at 11:19:25AM -0700, Andres Freund wrote: > > > On 2022-09-10 01:19:44 -0700, Andres Freund wrote: > > > > On 2022-09-09 22:57:36 -0700, Andres Freund wrote: >

Re: pgsql: aix: No need to use mkldexport when we want to export all symbol

2022-09-13 Thread Andres Freund
Hi, On 2022-09-12 20:38:45 -0700, Noah Misch wrote: > On Sun, Sep 11, 2022 at 11:19:25AM -0700, Andres Freund wrote: > > On 2022-09-10 01:19:44 -0700, Andres Freund wrote: > > > On 2022-09-09 22:57:36 -0700, Andres Freund wrote: > > > > On 2022-09-10 01:32:52 -0400, Tom Lane wrote: > > > > >