pgsql: Wrap ICU ucol_open().

2023-03-23 Thread Jeff Davis
Wrap ICU ucol_open(). Hide details of supporting older ICU versions in a wrapper function. The current code only needs to handle icu_set_collation_attributes(), but a subsequent commit will add additional version-specific code. Discussion: https://postgr.es/m/7ee414ad-deb5-1144-8a0e-b34ae3b71...

pgsql: Improve type handling in pg_dump's compress file API

2023-03-23 Thread Tomas Vondra
Improve type handling in pg_dump's compress file API After 0da243fed0 got committed, we've received a report about a compiler warning, related to the new LZ4File_gets() function: compress_lz4.c: In function 'LZ4File_gets': compress_lz4.c:492:19: warning: comparison of unsigned expression in

pgsql: Minor comment improvements for compress_lz4

2023-03-23 Thread Tomas Vondra
Minor comment improvements for compress_lz4 Author: Tomas Vondra Reviewed-by: Georgios Kokolatos, Justin Pryzby Discussion: https://postgr.es/m/33496f7c-3449-1426-d568-63f6bca2a...@gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d0160ca11e31878f94dd491fcde

pgsql: Unify buffer sizes in pg_dump compression API

2023-03-23 Thread Tomas Vondra
Unify buffer sizes in pg_dump compression API Prior to the introduction of the compression API in e9960732a9, pg_dump would use the ZLIB_IN_SIZE/ZLIB_OUT_SIZE to size input/output buffers. Commit 0da243fed0 introduced similar constants for LZ4, but while gzip defined both buffers to be 4kB, LZ4 us

pgsql: Add missing "-I." flag when building pg_bsd_indent.

2023-03-23 Thread Tom Lane
Add missing "-I." flag when building pg_bsd_indent. This is evidently not required by most compilers, but buildfarm member fairywren is unhappy without it. It looks like the meson infrastructure has this right already. Branch -- master Details --- https://git.postgresql.org/pg/commitdif

pgsql: amcheck: Fix a few bugs in new update chain validation.

2023-03-23 Thread Robert Haas
amcheck: Fix a few bugs in new update chain validation. We shouldn't set successor[whatever] to an offset number that is less than FirstOffsetNumber or more than maxoff. We already avoided that for redirects, but not for CTID links. Allowing bad offset numbers into the successor[] array causes cor

pgsql: Handle the "und" locale in ICU versions 54 and older.

2023-03-23 Thread Jeff Davis
Handle the "und" locale in ICU versions 54 and older. The "und" locale is an alternative spelling of the root locale, but it was not recognized until ICU 55. To maintain common behavior across all supported ICU versions, check for "und" and replace with "root" before opening. Previously, the lack

Re: pgsql: Handle the "und" locale in ICU versions 54 and older.

2023-03-23 Thread Tom Lane
Jeff Davis writes: > Handle the "und" locale in ICU versions 54 and older. > The "und" locale is an alternative spelling of the root locale, but it > was not recognized until ICU 55. To maintain common behavior across > all supported ICU versions, check for "und" and replace with "root" > before o

pgsql: Count updates that move row to a new page.

2023-03-23 Thread Peter Geoghegan
Count updates that move row to a new page. Add pgstat counter to track row updates that result in the successor version going to a new heap page, leaving behind an original version whose t_ctid points to the new version. The current count is shown by the n_tup_newpage_upd column of each of the pg

pgsql: doc: fix another case of missing productname markup

2023-03-23 Thread Daniel Gustafsson
doc: fix another case of missing productname markup As a follow-up commit to 0f85db92b9, this adds markup to another case of "PostgreSQL". Author: Hayato Kuroda Discussion: https://postgr.es/m/tyapr01mb58667a7c8317e267467cc599f5...@tyapr01mb5866.jpnprd01.prod.outlook.com Branch -- master

pgsql: Implement find_my_exec()'s path normalization using realpath(3).

2023-03-23 Thread Tom Lane
Implement find_my_exec()'s path normalization using realpath(3). Replace the symlink-chasing logic in find_my_exec with realpath(3), which has been required by POSIX since SUSv2. (Windows lacks realpath(), but there we can use _fullpath() which is functionally equivalent.) The main benefit of th

pgsql: Rename fields in pgstat structures for functions and relations

2023-03-23 Thread Michael Paquier
Rename fields in pgstat structures for functions and relations This commit renames the members of a few pgstat structures related to functions and relations, by respectively removing their prefix "f_" and "t_". The statistics for functions and relations and handled in their own file, and pgstatfu

pgsql: Rewrite error message related to sslmode in libpq

2023-03-23 Thread Michael Paquier
Rewrite error message related to sslmode in libpq The same error message will be used for a different option, to be introduced in a separate patch. Reshaping the error message as done here saves in translation. Extracted from a larger patch by the same author. Author: Jacob Champion Discussion:

pgsql: Doc: Improve description of the "batch_size" option for postgres

2023-03-23 Thread Etsuro Fujita
Doc: Improve description of the "batch_size" option for postgres_fdw. Document that the actual number of rows postgres_fdw inserts at once in the COPY case is determined in a similar way to the INSERT case, but it has a restriction that does not apply to the INSERT case. Follow-up for commit 97da

pgsql: meson: add install-{quiet, world} targets

2023-03-23 Thread Andres Freund
meson: add install-{quiet, world} targets To define our own install target, we need dependencies on the i18n targets, which we did not collect so far. Discussion: https://postgr.es/m/3fc3bb9b-f7f8-d442-35c1-ec82280c5...@enterprisedb.com Branch -- master Details --- https://git.postgres

pgsql: meson: make install_test_files more generic, rename to install_f

2023-03-23 Thread Andres Freund
meson: make install_test_files more generic, rename to install_files Now it supports installing directories and directory contents as well. This will be used in a subsequent patch to install documentation. Discussion: https://postgr.es/m/3fc3bb9b-f7f8-d442-35c1-ec82280c5...@enterprisedb.com Bra

pgsql: meson: add install-{docs,doc-html,doc-man} targets

2023-03-23 Thread Andres Freund
meson: add install-{docs,doc-html,doc-man} targets Discussion: https://postgr.es/m/3fc3bb9b-f7f8-d442-35c1-ec82280c5...@enterprisedb.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f13eb16485fec7958a59f263827b2333dea93e59 Modified Files -- doc/src/

pgsql: libpq: Add sslcertmode option to control client certificates

2023-03-23 Thread Michael Paquier
libpq: Add sslcertmode option to control client certificates The sslcertmode option controls whether the server is allowed and/or required to request a certificate from the client. There are three modes: - "allow" is the default and follows the current behavior, where a configured client certific

pgsql: meson: docs: add texinfo target

2023-03-23 Thread Andres Freund
meson: docs: add texinfo target Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/069ef254f145889d15c6ce4be526ce9e05284dc6 Modified Files -- doc/src/sgml/meson.build | 33 + 1 file changed, 33 insertions(+)

pgsql: Fix incorrect format placeholders

2023-03-23 Thread Peter Eisentraut
Fix incorrect format placeholders The fields of NLSVERSIONINFOEX are of type DWORD, which is unsigned long, so the results of the computations being printed are also of type unsigned long. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a9bc04b21182cb6030e248a4055dc