pgsql: Revert "Rename contrib module basic_archive to basic_wal_module"

2023-01-25 Thread Michael Paquier
Revert "Rename contrib module basic_archive to basic_wal_module" This reverts commit 0ad3c60, as per feedback from Tom Lane, Robert Haas and Andres Freund. The new name used for the module had little support. This moves back to basic_archive as module name, and we will likely use that as

pgsql: doc: Fix network_ops -> inet_ops in SpGiST operator class list

2023-01-25 Thread Michael Paquier
doc: Fix network_ops -> inet_ops in SpGiST operator class list network_ops is an opclass family of SpGiST, and the opclass able to work on the inet type is named inet_ops. Oversight in 7a1cd52, that reworked the design of the table listing all the operators available. Reported-by: Laurence

pgsql: doc: Fix network_ops -> inet_ops in SpGiST operator class list

2023-01-25 Thread Michael Paquier
doc: Fix network_ops -> inet_ops in SpGiST operator class list network_ops is an opclass family of SpGiST, and the opclass able to work on the inet type is named inet_ops. Oversight in 7a1cd52, that reworked the design of the table listing all the operators available. Reported-by: Laurence

pgsql: doc: Fix network_ops -> inet_ops in SpGiST operator class list

2023-01-25 Thread Michael Paquier
doc: Fix network_ops -> inet_ops in SpGiST operator class list network_ops is an opclass family of SpGiST, and the opclass able to work on the inet type is named inet_ops. Oversight in 7a1cd52, that reworked the design of the table listing all the operators available. Reported-by: Laurence

pgsql: Rename contrib module basic_archive to basic_wal_module

2023-01-24 Thread Michael Paquier
Rename contrib module basic_archive to basic_wal_module This rename is in preparation for the introduction of recovery modules, where basic_wal_module will be used as a base template for the set of callbacks introduced. The former name did not really reflect all that. Author: Nathan Bossart

Re: pgsql: instr_time: Represent time as an int64 on all platforms

2023-01-22 Thread Michael Paquier
Hi Andres, On Sat, Jan 21, 2023 at 05:25:19AM +, Andres Freund wrote: > instr_time: Represent time as an int64 on all platforms > > Until now we used struct timespec for instr_time on all platforms but > windows. Using struct timespec causes a fair bit of memory (struct timeval is > 16

pgsql: pg_walinspect: Add pg_get_wal_fpi_info()

2023-01-22 Thread Michael Paquier
pg_walinspect: Add pg_get_wal_fpi_info() This function is able to extract the full page images from a range of records, specified as of input arguments start_lsn and end_lsn. Like the other functions of this module, an error is returned if using LSNs that do not reflect real system values. All

pgsql: Rework format of comments in headers for nodes

2023-01-20 Thread Michael Paquier
Rework format of comments in headers for nodes This is similar to 835d476, except that this one is to add node attributes related to query jumbling and avoid long lines in the headers and in the node structures changed by this commit. Reviewed-by: Peter Eisentraut Discussion:

pgsql: Move queryjumble.c code to src/backend/nodes/

2023-01-20 Thread Michael Paquier
Move queryjumble.c code to src/backend/nodes/ This will ease a follow-up move that will generate automatically this code. The C file is renamed, for consistency with the node-related files whose code are generated by gen_node_support.pl: - queryjumble.c -> queryjumblefuncs.c -

pgsql: Support the same patterns for pg-user in pg_ident.conf as in pg_

2023-01-19 Thread Michael Paquier
Support the same patterns for pg-user in pg_ident.conf as in pg_hba.conf While pg_hba.conf has support for non-literal username matches, and this commit extends the capabilities that are supported for the PostgreSQL user listed in an ident entry part of pg_ident.conf, with support for: 1. The

pgsql: doc: Fix some issues in logical replication section

2023-01-18 Thread Michael Paquier
doc: Fix some issues in logical replication section wal_retrieve_retry_interval was mentioned under an incorrect name, and wal_sender_timeout was not listed as affecting WAL senders in logical replication mode. Author: Takamichi Osumi Discussion:

pgsql: Add missing assign hook for GUC checkpoint_completion_target

2023-01-18 Thread Michael Paquier
Add missing assign hook for GUC checkpoint_completion_target This is wrong since 88e9823, that has switched the WAL sizing configuration from checkpoint_segments to min_wal_size and max_wal_size. This missed the recalculation of the internal value of the internal "CheckPointSegments", that works

pgsql: Add missing assign hook for GUC checkpoint_completion_target

2023-01-18 Thread Michael Paquier
Add missing assign hook for GUC checkpoint_completion_target This is wrong since 88e9823, that has switched the WAL sizing configuration from checkpoint_segments to min_wal_size and max_wal_size. This missed the recalculation of the internal value of the internal "CheckPointSegments", that works

pgsql: Add missing assign hook for GUC checkpoint_completion_target

2023-01-18 Thread Michael Paquier
Add missing assign hook for GUC checkpoint_completion_target This is wrong since 88e9823, that has switched the WAL sizing configuration from checkpoint_segments to min_wal_size and max_wal_size. This missed the recalculation of the internal value of the internal "CheckPointSegments", that works

pgsql: Add missing assign hook for GUC checkpoint_completion_target

2023-01-18 Thread Michael Paquier
Add missing assign hook for GUC checkpoint_completion_target This is wrong since 88e9823, that has switched the WAL sizing configuration from checkpoint_segments to min_wal_size and max_wal_size. This missed the recalculation of the internal value of the internal "CheckPointSegments", that works

pgsql: Add missing assign hook for GUC checkpoint_completion_target

2023-01-18 Thread Michael Paquier
Add missing assign hook for GUC checkpoint_completion_target This is wrong since 88e9823, that has switched the WAL sizing configuration from checkpoint_segments to min_wal_size and max_wal_size. This missed the recalculation of the internal value of the internal "CheckPointSegments", that works

pgsql: Add missing assign hook for GUC checkpoint_completion_target

2023-01-18 Thread Michael Paquier
Add missing assign hook for GUC checkpoint_completion_target This is wrong since 88e9823, that has switched the WAL sizing configuration from checkpoint_segments to min_wal_size and max_wal_size. This missed the recalculation of the internal value of the internal "CheckPointSegments", that works

pgsql: Fix failure with perlcritic in psql's create_help.pl

2023-01-18 Thread Michael Paquier
Fix failure with perlcritic in psql's create_help.pl No buildfarm members have reported that yet, but a recently-refreshed Debian host did. Reviewed-by: Andrew Dunstan Discussion: https://postgr.es/m/Y8ey5z4Nav62g4/k...@paquier.xyz Backpatch-through: 11 Branch -- REL_14_STABLE Details

pgsql: Fix failure with perlcritic in psql's create_help.pl

2023-01-18 Thread Michael Paquier
Fix failure with perlcritic in psql's create_help.pl No buildfarm members have reported that yet, but a recently-refreshed Debian host did. Reviewed-by: Andrew Dunstan Discussion: https://postgr.es/m/Y8ey5z4Nav62g4/k...@paquier.xyz Backpatch-through: 11 Branch -- REL_12_STABLE Details

pgsql: Fix failure with perlcritic in psql's create_help.pl

2023-01-18 Thread Michael Paquier
Fix failure with perlcritic in psql's create_help.pl No buildfarm members have reported that yet, but a recently-refreshed Debian host did. Reviewed-by: Andrew Dunstan Discussion: https://postgr.es/m/Y8ey5z4Nav62g4/k...@paquier.xyz Backpatch-through: 11 Branch -- master Details ---

pgsql: Fix failure with perlcritic in psql's create_help.pl

2023-01-18 Thread Michael Paquier
Fix failure with perlcritic in psql's create_help.pl No buildfarm members have reported that yet, but a recently-refreshed Debian host did. Reviewed-by: Andrew Dunstan Discussion: https://postgr.es/m/Y8ey5z4Nav62g4/k...@paquier.xyz Backpatch-through: 11 Branch -- REL_11_STABLE Details

pgsql: Fix failure with perlcritic in psql's create_help.pl

2023-01-18 Thread Michael Paquier
Fix failure with perlcritic in psql's create_help.pl No buildfarm members have reported that yet, but a recently-refreshed Debian host did. Reviewed-by: Andrew Dunstan Discussion: https://postgr.es/m/Y8ey5z4Nav62g4/k...@paquier.xyz Backpatch-through: 11 Branch -- REL_15_STABLE Details

pgsql: Fix failure with perlcritic in psql's create_help.pl

2023-01-18 Thread Michael Paquier
Fix failure with perlcritic in psql's create_help.pl No buildfarm members have reported that yet, but a recently-refreshed Debian host did. Reviewed-by: Andrew Dunstan Discussion: https://postgr.es/m/Y8ey5z4Nav62g4/k...@paquier.xyz Backpatch-through: 11 Branch -- REL_13_STABLE Details

pgsql: Refactor code for restoring files via shell commands

2023-01-17 Thread Michael Paquier
as long as RestoreArchivedFile() includes a call to make_native_path(). Author: Nathan Bossart Reviewed-by: Andres Freund, Michael Paquier Discussion: https://postgr.es/m/20221227192449.GA3672473@nathanxps13 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Constify the arguments of copydir.h functions

2023-01-17 Thread Michael Paquier
Constify the arguments of copydir.h functions This makes sure that the internal logic of these functions does not attempt to change the value of the arguments constified, and it removes one unconstify() in basic_archive.c. Author: Nathan Bossart Reviewed-by: Andrew Dunstan, Peter Eisentraut

pgsql: Track behavior of \1 in pg_ident.conf when quoted

2023-01-16 Thread Michael Paquier
Track behavior of \1 in pg_ident.conf when quoted Entries of pg-user in pg_ident.conf that are quoted and include '\1' allow a replacement from a subexpression in a system user regexp. This commit adds a test to track this behavior and a note in the documentation, as it could be affected by the

pgsql: Refactor code in charge of running shell-based recovery commands

2023-01-15 Thread Michael Paquier
similarly to the functions introduced here. Author: Nathan Bossart Reviewed-by: Andres Freund, Michael Paquier Discussion: https://postgr.es/m/20221227192449.GA3672473@nathanxps13 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9a740f81eb02e04179d78f3df2ce67

pgsql: Store IdentLine->pg_user as an AuthToken

2023-01-15 Thread Michael Paquier
Store IdentLine->pg_user as an AuthToken While system_user was stored as an AuthToken in IdentLine, pg_user was stored as a plain string. This commit changes the code as we start storing pg_user as an AuthToken too. This does not have any functional changes, as all the operations on pg_user

pgsql: Add tests for regex replacement with \1 in pg_ident.conf to 0003

2023-01-12 Thread Michael Paquier
Add tests for regex replacement with \1 in pg_ident.conf to 0003_peer.pl Regexp replacement with \1 in pg_ident.conf is tested in one check of the kerberos test suite, still it requires a dependency on --with-gssapi to be triggered. This commit adds to the test suite of peer authentication two

pgsql: doc: Simplify description of functions for pg_walinspect

2023-01-12 Thread Michael Paquier
doc: Simplify description of functions for pg_walinspect As introduced in 2258e76, the docs were hard to parse: - The examples used listed a lot of long records, bloating the output. These are switched to show less records with the expanded format, similarly to pageinspect. - The function

pgsql: doc: Simplify description of functions for pg_walinspect

2023-01-12 Thread Michael Paquier
doc: Simplify description of functions for pg_walinspect As introduced in 2258e76, the docs were hard to parse: - The examples used listed a lot of long records, bloating the output. These are switched to show less records with the expanded format, similarly to pageinspect. - The function

Re: pgsql: Revert "Get rid of the "new" and "old" entries in a view's range

2023-01-11 Thread Michael Paquier
On Thu, Jan 12, 2023 at 04:01:31AM +, Tom Lane wrote: > Revert "Get rid of the "new" and "old" entries in a view's rangetable." > > This reverts commit 1b4d280ea1eb7ddb2e16654d5fa16960bb959566. > It's broken the buildfarm members that run cross-version-upgrade tests, > because they're not

pgsql: Rename some variables related to ident files in hba.{c,h}

2023-01-11 Thread Michael Paquier
Rename some variables related to ident files in hba.{c,h} The code that handles authentication for user maps was pretty confusing with its choice of variable names. It involves two types of users: a system user and a Postgres user (well, role), and these were not named consistently throughout

pgsql: Fix incorrect comment in hba.h

2023-01-11 Thread Michael Paquier
Fix incorrect comment in hba.h A comment in hba.h mentioned that AuthTokens are used when building the IdentLines from pg_ident.conf, but since 8fea868 that has added support of regexps for databases and roles in pg_hba.conf, it is also the case of HBA files. This refreshes the comment to refer

pgsql: Acquire spinlock when updating 2PC slot data during logical deco

2023-01-11 Thread Michael Paquier
Acquire spinlock when updating 2PC slot data during logical decoding creation The creation of a logical decoding context in CreateDecodingContext() updates some data of its slot for two-phase transactions if enabled by the caller, but the code forgot to acquire a spinlock when updating these

pgsql: Acquire spinlock when updating 2PC slot data during logical deco

2023-01-11 Thread Michael Paquier
Acquire spinlock when updating 2PC slot data during logical decoding creation The creation of a logical decoding context in CreateDecodingContext() updates some data of its slot for two-phase transactions if enabled by the caller, but the code forgot to acquire a spinlock when updating these

pgsql: Add support for tab completion after ALTER EXTENSION ADD|DROP in

2023-01-11 Thread Michael Paquier
Add support for tab completion after ALTER EXTENSION ADD|DROP in psql This appends the set of object types supported by these commands, and the objects defined in the cluster are completed after that. Note that these may not be in the extension being working on when using DROP, to keep the code

pgsql: Fix typos in code and comments

2023-01-10 Thread Michael Paquier
Fix typos in code and comments Author: Justin Pryzby Discussion: https://postgr.es/m/20230110045722.gd9...@telsasoft.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5f6401f81cb24bd3930e0dc589fc4aa8b5424cdc Modified Files --

pgsql: Remove function declarations from headers for some undefined fun

2023-01-10 Thread Michael Paquier
Remove function declarations from headers for some undefined functions The functions whose declarations are removed here have been removed in the past, but their respective headers forgot the call. Author: Justin Pryzby Discussion: https://postgr.es/m/20230110045722.gd9...@telsasoft.com Branch

pgsql: Avoid using tuple from syscache for update of pg_database.datfro

2023-01-10 Thread Michael Paquier
Avoid using tuple from syscache for update of pg_database.datfrozenxid pg_database.datfrozenxid gets updated using an in-place update at the end of vacuum or autovacuum. Since 96cdeae, as pg_database has a toast relation, it is possible for a pg_database tuple to have toast values if there is a

pgsql: Avoid using tuple from syscache for update of pg_database.datfro

2023-01-10 Thread Michael Paquier
Avoid using tuple from syscache for update of pg_database.datfrozenxid pg_database.datfrozenxid gets updated using an in-place update at the end of vacuum or autovacuum. Since 96cdeae, as pg_database has a toast relation, it is possible for a pg_database tuple to have toast values if there is a

pgsql: Fix typos in comments, code and documentation

2023-01-02 Thread Michael Paquier
Fix typos in comments, code and documentation While on it, newlines are removed from the end of two elog() strings. The others are simple grammar mistakes. One comment in pg_upgrade referred incorrectly to sequences since a7e5457. Author: Justin Pryzby Discussion:

pgsql: Fix typos in comments, code and documentation

2023-01-02 Thread Michael Paquier
Fix typos in comments, code and documentation While on it, newlines are removed from the end of two elog() strings. The others are simple grammar mistakes. One comment in pg_upgrade referred incorrectly to sequences since a7e5457. Author: Justin Pryzby Discussion:

pgsql: Fix typos in comments, code and documentation

2023-01-02 Thread Michael Paquier
Fix typos in comments, code and documentation While on it, newlines are removed from the end of two elog() strings. The others are simple grammar mistakes. One comment in pg_upgrade referred incorrectly to sequences since a7e5457. Author: Justin Pryzby Discussion:

pgsql: Fix typos in comments, code and documentation

2023-01-02 Thread Michael Paquier
Fix typos in comments, code and documentation While on it, newlines are removed from the end of two elog() strings. The others are simple grammar mistakes. One comment in pg_upgrade referred incorrectly to sequences since a7e5457. Author: Justin Pryzby Discussion:

pgsql: Fix typos in comments, code and documentation

2023-01-02 Thread Michael Paquier
Fix typos in comments, code and documentation While on it, newlines are removed from the end of two elog() strings. The others are simple grammar mistakes. One comment in pg_upgrade referred incorrectly to sequences since a7e5457. Author: Justin Pryzby Discussion:

pgsql: Fix typos in comments, code and documentation

2023-01-02 Thread Michael Paquier
Fix typos in comments, code and documentation While on it, newlines are removed from the end of two elog() strings. The others are simple grammar mistakes. One comment in pg_upgrade referred incorrectly to sequences since a7e5457. Author: Justin Pryzby Discussion:

pgsql: Fix precision handling for some COERCE_SQL_SYNTAX functions

2022-12-30 Thread Michael Paquier
in timestamp.c, while I have noticed the ones in date.c. Regression tests are added for all of them with precisions high enough to provide coverage for the warnings, something that went missing up to this commit. Author: Ian Lawrence Barwick, Michael Paquier Discussion: https://postgr.es/m/CAB8KJ

pgsql: Add custom filtering rules to the TAP tests of pg_upgrade

2022-12-26 Thread Michael Paquier
Add custom filtering rules to the TAP tests of pg_upgrade 002_pg_upgrade.pl gains support for a new environment variable called "filter_rules", that can be used to point to a file that includes a set of custom regular expressions that would be applied to the dumps of the origin and target

pgsql: Fix incorrect copy-pasto in error message of pg_waldump.c

2022-12-26 Thread Michael Paquier
Fix incorrect copy-pasto in error message of pg_waldump.c The error message used on fclose() failure was incorrect, so fix it. Oversight in d497093, that I have somehow managed to miss. Branch -- master Details ---

pgsql: pg_waldump: Add --save-fullpage=PATH to save full page images fr

2022-12-26 Thread Michael Paquier
pg_waldump: Add --save-fullpage=PATH to save full page images from WAL records This option extracts (potentially decompressing) full-page images included in WAL records into a given target directory. These images are subject to the same filtering rules as the normal display of the WAL records,

pgsql: Switch query fixing aclitems in ~15 from O(N^2) to O(N) in upgra

2022-12-25 Thread Michael Paquier
Switch query fixing aclitems in ~15 from O(N^2) to O(N) in upgrade_adapt.sql f4f2f2b was doing a sequential scan of pg_class before checking if a relation had attributes dependent on aclitem as data typewhen building the set of ALTER TABLE queries, but it would be costly on a regression database.

pgsql: Update upgrade_adapt.sql to handle tables using aclitem as data

2022-12-22 Thread Michael Paquier
Update upgrade_adapt.sql to handle tables using aclitem as data type The regression test suite includes a table called "tab_core_types" that has one attribute based on the type "aclitem". Keeping this attribute as-is causes hard failures when running pg_upgrade with an origin on ~15. This

pgsql: Fix some incorrectness in upgrade_adapt.sql on query for WITH OI

2022-12-22 Thread Michael Paquier
quote_ident() in the ALTER TABLE strings built on the relation name. Author: Anton A. Melnikov, Michael Paquier Discussion: https://postgr.es/m/49f389ba-95ce-8a9b-09ae-f60650c0e...@inbox.ru Backpatch-through: 12 Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix some incorrectness in upgrade_adapt.sql on query for WITH OI

2022-12-22 Thread Michael Paquier
quote_ident() in the ALTER TABLE strings built on the relation name. Author: Anton A. Melnikov, Michael Paquier Discussion: https://postgr.es/m/49f389ba-95ce-8a9b-09ae-f60650c0e...@inbox.ru Backpatch-through: 12 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix some incorrectness in upgrade_adapt.sql on query for WITH OI

2022-12-22 Thread Michael Paquier
quote_ident() in the ALTER TABLE strings built on the relation name. Author: Anton A. Melnikov, Michael Paquier Discussion: https://postgr.es/m/49f389ba-95ce-8a9b-09ae-f60650c0e...@inbox.ru Backpatch-through: 12 Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix some incorrectness in upgrade_adapt.sql on query for WITH OI

2022-12-22 Thread Michael Paquier
quote_ident() in the ALTER TABLE strings built on the relation name. Author: Anton A. Melnikov, Michael Paquier Discussion: https://postgr.es/m/49f389ba-95ce-8a9b-09ae-f60650c0e...@inbox.ru Backpatch-through: 12 Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix some incorrectness in upgrade_adapt.sql on query for WITH OI

2022-12-22 Thread Michael Paquier
quote_ident() in the ALTER TABLE strings built on the relation name. Author: Anton A. Melnikov, Michael Paquier Discussion: https://postgr.es/m/49f389ba-95ce-8a9b-09ae-f60650c0e...@inbox.ru Backpatch-through: 12 Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff

Re: pgsql: Remove dead code

2022-12-22 Thread Michael Paquier
On Thu, Dec 22, 2022 at 09:30:41AM -0600, Justin Pryzby wrote: > This caused me to notice various wrong-looking elog()s. Nice catch. These have been wrong for quite some time, so I have done something down to v11 while passing by.. -- Michael signature.asc Description: PGP signature

pgsql: Fix come incorrect elog() messages in aclchk.c

2022-12-22 Thread Michael Paquier
Fix come incorrect elog() messages in aclchk.c Three error strings used with cache lookup failures were referring to incorrect object types for ACL checks: - Schemas - Types - Foreign Servers There errors should never be triggered, but if they do incorrect information would be reported. Author:

pgsql: Fix come incorrect elog() messages in aclchk.c

2022-12-22 Thread Michael Paquier
Fix come incorrect elog() messages in aclchk.c Three error strings used with cache lookup failures were referring to incorrect object types for ACL checks: - Schemas - Types - Foreign Servers There errors should never be triggered, but if they do incorrect information would be reported. Author:

pgsql: Fix come incorrect elog() messages in aclchk.c

2022-12-22 Thread Michael Paquier
Fix come incorrect elog() messages in aclchk.c Three error strings used with cache lookup failures were referring to incorrect object types for ACL checks: - Schemas - Types - Foreign Servers There errors should never be triggered, but if they do incorrect information would be reported. Author:

pgsql: Fix come incorrect elog() messages in aclchk.c

2022-12-22 Thread Michael Paquier
Fix come incorrect elog() messages in aclchk.c Three error strings used with cache lookup failures were referring to incorrect object types for ACL checks: - Schemas - Types - Foreign Servers There errors should never be triggered, but if they do incorrect information would be reported. Author:

pgsql: Fix come incorrect elog() messages in aclchk.c

2022-12-22 Thread Michael Paquier
Fix come incorrect elog() messages in aclchk.c Three error strings used with cache lookup failures were referring to incorrect object types for ACL checks: - Schemas - Types - Foreign Servers There errors should never be triggered, but if they do incorrect information would be reported. Author:

pgsql: Fix come incorrect elog() messages in aclchk.c

2022-12-22 Thread Michael Paquier
Fix come incorrect elog() messages in aclchk.c Three error strings used with cache lookup failures were referring to incorrect object types for ACL checks: - Schemas - Types - Foreign Servers There errors should never be triggered, but if they do incorrect information would be reported. Author:

pgsql: Rename pg_dissect_walfile_name() to pg_split_walfile_name()

2022-12-22 Thread Michael Paquier
gestion from Kyotaro Horiguchi. The documentation is updated to reflect all these changes. Bump catalog version. Author: Bharath Rupireddy, Michael Paquier Discussion: https://postgr.es/m/cabueveytqvaoohgdoh0d7hgwe3fukcrf6nthssw7ww04emt...@mail.gmail.com Branch -- master Details ---

pgsql: Fix operator typo in tablecmds.c

2022-12-21 Thread Michael Paquier
Fix operator typo in tablecmds.c A bitwise operator was getting used on two bools in ATAddCheckConstraint() to track if constraints should be merged or not with the existing ones of a relation, though obviously this should use a boolean OR operator. This led to the same result, but let's be

pgsql: Make more consistent some translated strings related to compress

2022-12-20 Thread Michael Paquier
Make more consistent some translated strings related to compression This commit changes some of the bbstreamer files and pg_dump to use the same style as a few other places (like common/compression.c), where the name of the compression method is not part of the string, but an argument of it.

pgsql: Switch some system functions to use get_call_result_type()

2022-12-20 Thread Michael Paquier
repeatedly for monitoring purposes). Author: Bharath Rupireddy Reviewed-by: Robert Haas, Álvaro Herrera, Tom Lane, Michael Paquier Discussion: https://postgr.es/m/calj2acv23hw5hp5hfjd89fns-z5x8r2jnxdmxcpn2bgttkd...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg

pgsql: Add pg_dissect_walfile_name()

2022-12-19 Thread Michael Paquier
Orlov, Michael Paquier Discussion: https://postgr.es/m/CALj2ACWV=FCddsxcGbVOA=cvPyMr75YCFbSQT6g4KDj=gcj...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/cca186348929cd75f23ef1b25922386bf38cf99c Modified Files -- doc/src/sgml/func.sgml

pgsql: Remove hardcoded dependency to cryptohash type in the internals

2022-12-19 Thread Michael Paquier
for the exchange, assuming currently that only SHA-256 is supported for the moment. Note that the mock authentication simply enforces SHA-256. Author: Michael Paquier Reviewed-by: Peter Eisentraut, Jonathan Katz Discussion: https://postgr.es/m/Y5k3Qiweo/1g9...@paquier.xyz Branch -- master Details

pgsql: Remove SHA256_HMAC_B from scram-common.h

2022-12-13 Thread Michael Paquier
Remove SHA256_HMAC_B from scram-common.h This referred to the size of the buffers for k_ipad and k_opad in HMAC computations. This is unused since e6bdfd9, where SCRAM has switched to the cryptohash routines for its HMAC calculations rather than its own maths. Reviewed-by: Jacob Champion

pgsql: Add support for GRANT SET in psql tab completion

2022-12-11 Thread Michael Paquier
Add support for GRANT SET in psql tab completion 3d14e17 has added support for this query but psql was not able to complete it. Spotted while working on a different patch in the same area. Reviewed-by: Robert Haas Discussion: https://postgr.es/m/y3hw7yvg0vwpc...@paquier.xyz Branch --

pgsql: Remove direct call to GetNewObjectId() for pg_auth_members.oid

2022-12-11 Thread Michael Paquier
Remove direct call to GetNewObjectId() for pg_auth_members.oid This routine should not be called directly as mentioned at its top, so replace it by GetNewOidWithIndex(). Issue introduced by 6566133 when pg_auth_members.oid got added, so no backpatch is needed. Author: Maciek Sakrejda

pgsql: Fix macro definitions in pgstatfuncs.c

2022-12-09 Thread Michael Paquier
, per comment from Tom Lane. Reported-by: Tom Lane, and buildfarm member wrasse Author: Nathan Bossart, Michael Paquier Discussion: https://postgr.es/m/1188769.1670640...@sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Generate pg_stat_get*() functions for databases using macros

2022-12-06 Thread Michael Paquier
hundred lines of originally-duplicated code patterns. The function names remain the same, but some fields of PgStat_StatDBEntry have to be renamed to cope with the new style. This is in the same spirit as 83a1a1b. Author: Michael Paquier Reviewed-by: Nathan Bossart, Bertrand Drouvot Discussion: https

pgsql: Generate pg_stat_get*() functions for tables using macros

2022-12-05 Thread Michael Paquier
Generate pg_stat_get*() functions for tables using macros The same code pattern is repeated 17 times for int64 counters (0 for missing entry) and 5 times for timestamps (NULL for missing entry) on table entries. This code is switched to use a macro for the basic code instead, shaving a few

pgsql: Provide test coverage in pg_dump for default behaviors with comp

2022-12-05 Thread Michael Paquier
with the design for command_like. Author: Georgios Kokolatos, Michael Paquier Discussion: https://postgr.es/m/DQn4czCWR1rcbGPLL7p3LfEr5-kGmlySm-H05VgroINdikvhtS5r9EdI6b8D8sjnbKdJ09k-cxs2AqijBeHAWk9Q8gvEAxPRHuLRhwONcGc=@pm.me Branch -- master Details --- https://git.postgresql.org/pg

pgsql: doc: Add missing markups for developer GUCs

2022-12-04 Thread Michael Paquier
doc: Add missing markups for developer GUCs Missing such markups makes it impossible to create links back to these GUCs, and all the other parameters have one already. Author: Ian Lawrence Barwick Discussion:

pgsql: doc: Add missing markups for developer GUCs

2022-12-04 Thread Michael Paquier
doc: Add missing markups for developer GUCs Missing such markups makes it impossible to create links back to these GUCs, and all the other parameters have one already. Author: Ian Lawrence Barwick Discussion:

pgsql: doc: Add missing markups for developer GUCs

2022-12-04 Thread Michael Paquier
doc: Add missing markups for developer GUCs Missing such markups makes it impossible to create links back to these GUCs, and all the other parameters have one already. Author: Ian Lawrence Barwick Discussion:

pgsql: doc: Add missing markups for developer GUCs

2022-12-04 Thread Michael Paquier
doc: Add missing markups for developer GUCs Missing such markups makes it impossible to create links back to these GUCs, and all the other parameters have one already. Author: Ian Lawrence Barwick Discussion:

pgsql: doc: Add missing markups for developer GUCs

2022-12-04 Thread Michael Paquier
doc: Add missing markups for developer GUCs Missing such markups makes it impossible to create links back to these GUCs, and all the other parameters have one already. Author: Ian Lawrence Barwick Discussion:

pgsql: doc: Add missing markups for developer GUCs

2022-12-04 Thread Michael Paquier
doc: Add missing markups for developer GUCs Missing such markups makes it impossible to create links back to these GUCs, and all the other parameters have one already. Author: Ian Lawrence Barwick Discussion:

pgsql: Add LSN location in some error messages related to WAL pages

2022-12-04 Thread Michael Paquier
it if looking at the surroundings with pg_waldump or similar. Adding this information costs a bit in translation, but also eases debugging. Author: Bharath Rupireddy Reviewed-by: Álvaro Herrera, Kyotaro Horiguchi, Maxim Orlov, Michael Paquier Discussion: https://postgr.es/m/CALj2ACWV=FCddsxcGbVOA

pgsql: Switch pg_dump to use compression specifications

2022-12-01 Thread Michael Paquier
with gzip, and left uncompressed without gzip. Author: Georgios Kokolatos Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/O4mutIrCES8ZhlXJiMvzsivT7ztAMja2lkdL1LJx6O5f22I2W8PBIeLKz7mDLwxHoibcnRAYJXm1pH4tyUNC4a8eDzLn22a6Pb1S74Niexg=@pm.me Branch -- master Details ---

pgsql: Make materialized views participate in predicate locking

2022-11-30 Thread Michael Paquier
: Yugo Nagata Reviewed-by: Richard Guo, Dilip Kumar, Michael Paquier Discussion: https://postgr.es/m/20220726164434.42d4e33911b4b4fcf751c...@sraoss.co.jp Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/43351557d0d2b9c5e20298b5fee2849abef86aff Modified Files

pgsql: Add regression tests for psql's \o and \g on files

2022-11-29 Thread Michael Paquier
Add regression tests for psql's \o and \g on files This adds coverage for a few scenarios not checked yet in psql, with multiple query combined across files defined by \o, \g or both at the same time. The results are saved in the output files defined, then reloaded back to check what has been

pgsql: Refactor code parsing compression option values (-Z/--compress)

2022-11-29 Thread Michael Paquier
d for compression specifications, one area discussed lately being pg_dump. Author: Georgios Kokolatos, Michael Paquier Discussion: https://postgr.es/m/O4mutIrCES8ZhlXJiMvzsivT7ztAMja2lkdL1LJx6O5f22I2W8PBIeLKz7mDLwxHoibcnRAYJXm1pH4tyUNC4a8eDzLn22a6Pb1S74Niexg=@pm.me Branch -- master Det

pgsql: Fix comment in fe-auth-scram.c

2022-11-29 Thread Michael Paquier
Fix comment in fe-auth-scram.c The frontend-side routine in charge of building a SCRAM verifier mentioned that the restrictions applying to SASLprep on the password with the encoding are described at the top of fe-auth-scram.c, but this information is in auth-scram.c. This is wrong since

pgsql: Fix comment in fe-auth-scram.c

2022-11-29 Thread Michael Paquier
Fix comment in fe-auth-scram.c The frontend-side routine in charge of building a SCRAM verifier mentioned that the restrictions applying to SASLprep on the password with the encoding are described at the top of fe-auth-scram.c, but this information is in auth-scram.c. This is wrong since

pgsql: Fix comment in fe-auth-scram.c

2022-11-29 Thread Michael Paquier
Fix comment in fe-auth-scram.c The frontend-side routine in charge of building a SCRAM verifier mentioned that the restrictions applying to SASLprep on the password with the encoding are described at the top of fe-auth-scram.c, but this information is in auth-scram.c. This is wrong since

pgsql: Fix comment in fe-auth-scram.c

2022-11-29 Thread Michael Paquier
Fix comment in fe-auth-scram.c The frontend-side routine in charge of building a SCRAM verifier mentioned that the restrictions applying to SASLprep on the password with the encoding are described at the top of fe-auth-scram.c, but this information is in auth-scram.c. This is wrong since

pgsql: Fix comment in fe-auth-scram.c

2022-11-29 Thread Michael Paquier
Fix comment in fe-auth-scram.c The frontend-side routine in charge of building a SCRAM verifier mentioned that the restrictions applying to SASLprep on the password with the encoding are described at the top of fe-auth-scram.c, but this information is in auth-scram.c. This is wrong since

pgsql: Fix comment in fe-auth-scram.c

2022-11-29 Thread Michael Paquier
Fix comment in fe-auth-scram.c The frontend-side routine in charge of building a SCRAM verifier mentioned that the restrictions applying to SASLprep on the password with the encoding are described at the top of fe-auth-scram.c, but this information is in auth-scram.c. This is wrong since

pgsql: meson: Add some missing env settings for tests of pg_dump and pg

2022-11-28 Thread Michael Paquier
in pg_verifybackup while looking at the rest of the tree. Author: Georgios Kokolatos, Michael Paquier Discussion: https://postgr.es/m/O4mutIrCES8ZhlXJiMvzsivT7ztAMja2lkdL1LJx6O5f22I2W8PBIeLKz7mDLwxHoibcnRAYJXm1pH4tyUNC4a8eDzLn22a6Pb1S74Niexg=@pm.me Branch -- master Details --- https

pgsql: Fix comment in snapbuild.c

2022-11-28 Thread Michael Paquier
Fix comment in snapbuild.c Author: Masahiko Sawada Discussion: https://postgr.es/m/cad21aoamf-pksnmgajg2dtghp7o7vphoexcxfqlkzg8xrbr...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8aa03f3caaed9dd438a20c3423daa43a44549d60 Modified Files

pgsql: Add TAP tests for include directives in HBA end ident files

2022-11-27 Thread Michael Paquier
ickier), and what we have here covers most of the ground I would like to see covered if one manipulates the tokenization logic of hba.c in the future. While on it, some coverage is added for files included with '@' for database or user name lists. Author: Julien Rouhaud Reviewed-by: Michael Paquier D

Re: pgsql: Prevent port collisions between concurrent TAP tests

2022-11-26 Thread Michael Paquier
On Sat, Nov 26, 2022 at 07:40:52AM -0500, Andrew Dunstan wrote: > Yes, good point. Will do. Thanks. -- Michael signature.asc Description: PGP signature

pgsql: Mark two signal flags as sig_atomic_t in pgbench and pg_test_fsy

2022-11-26 Thread Michael Paquier
Reviewed-by: Michael Paquier, Masahiko Sawada Discussion: https://postgr.es/m/CAEudQArCDQQiPiFR16=yu9k5s2tp4tgee1u1zbkw4ofx81a...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1e314847dd69c6b3b85d36e5873d80b9e4cf028a Modified Files -- src/bin

<    4   5   6   7   8   9   10   11   12   13   >