pgsql: doc: for various substring funcs, document if only first match

2021-07-26 Thread Bruce Momjian
doc: for various substring funcs, document if only first match Reported-by: t...@frericks.us Discussion: https://postgr.es/m/162614304115.701.2392941350859387...@wrigleys.postgresql.org Backpatch-through: 13 Branch -- REL_14_STABLE Details ---

pgsql: doc: for various substring funcs, document if only first match

2021-07-26 Thread Bruce Momjian
doc: for various substring funcs, document if only first match Reported-by: t...@frericks.us Discussion: https://postgr.es/m/162614304115.701.2392941350859387...@wrigleys.postgresql.org Backpatch-through: 13 Branch -- master Details ---

pgsql: doc: for various substring funcs, document if only first match

2021-07-26 Thread Bruce Momjian
doc: for various substring funcs, document if only first match Reported-by: t...@frericks.us Discussion: https://postgr.es/m/162614304115.701.2392941350859387...@wrigleys.postgresql.org Backpatch-through: 13 Branch -- REL_13_STABLE Details ---

pgsql: pg_resetxlog: add option to set oldest xid & use by pg_upgrade

2021-07-26 Thread Bruce Momjian
pg_resetxlog: add option to set oldest xid & use by pg_upgrade Add pg_resetxlog -u option to set the oldest xid in pg_control. Previously -x set this value be -2 billion less than the -x value. However, this causes the server to immediately scan all relation's relfrozenxid so it can advance

pgsql: pg_resetxlog: add option to set oldest xid & use by pg_upgrade

2021-07-26 Thread Bruce Momjian
pg_resetxlog: add option to set oldest xid & use by pg_upgrade Add pg_resetxlog -u option to set the oldest xid in pg_control. Previously -x set this value be -2 billion less than the -x value. However, this causes the server to immediately scan all relation's relfrozenxid so it can advance

pgsql: pg_resetxlog: add option to set oldest xid & use by pg_upgrade

2021-07-26 Thread Bruce Momjian
pg_resetxlog: add option to set oldest xid & use by pg_upgrade Add pg_resetxlog -u option to set the oldest xid in pg_control. Previously -x set this value be -2 billion less than the -x value. However, this causes the server to immediately scan all relation's relfrozenxid so it can advance

pgsql: pg_resetxlog: add option to set oldest xid & use by pg_upgrade

2021-07-26 Thread Bruce Momjian
pg_resetxlog: add option to set oldest xid & use by pg_upgrade Add pg_resetxlog -u option to set the oldest xid in pg_control. Previously -x set this value be -2 billion less than the -x value. However, this causes the server to immediately scan all relation's relfrozenxid so it can advance

pgsql: pg_resetxlog: add option to set oldest xid & use by pg_upgrade

2021-07-26 Thread Bruce Momjian
pg_resetxlog: add option to set oldest xid & use by pg_upgrade Add pg_resetxlog -u option to set the oldest xid in pg_control. Previously -x set this value be -2 billion less than the -x value. However, this causes the server to immediately scan all relation's relfrozenxid so it can advance

pgsql: pg_resetxlog: add option to set oldest xid & use by pg_upgrade

2021-07-26 Thread Bruce Momjian
pg_resetxlog: add option to set oldest xid & use by pg_upgrade Add pg_resetxlog -u option to set the oldest xid in pg_control. Previously -x set this value be -2 billion less than the -x value. However, this causes the server to immediately scan all relation's relfrozenxid so it can advance

pgsql: pg_resetxlog: add option to set oldest xid & use by pg_upgrade

2021-07-26 Thread Bruce Momjian
pg_resetxlog: add option to set oldest xid & use by pg_upgrade Add pg_resetxlog -u option to set the oldest xid in pg_control. Previously -x set this value be -2 billion less than the -x value. However, this causes the server to immediately scan all relation's relfrozenxid so it can advance

pgsql: Simplify matching pattern check in TAP tests of pg_receivewal

2021-07-26 Thread Michael Paquier
Simplify matching pattern check in TAP tests of pg_receivewal A check in the ZLIB portion of the test to match the name of a non-compressed partial segment with a completed compressed segment was using m//, while a simple equality check is enough. This makes the test a bit stricter without

pgsql: Skip trailing whitespaces when parsing integer options

2021-07-26 Thread Michael Paquier
Skip trailing whitespaces when parsing integer options strtoint(), via strtol(), would skip leading whitespaces but the same rule was not applied for trailing whitespaces, leading to an inconsistent behavior. Some tests are changed to cover more this area. Author: Michael Paquier Reviewed-by:

pgsql: Remove newly added useless assertion check

2021-07-26 Thread Alvaro Herrera
Remove newly added useless assertion check Coverity complained that my commit 80ba4bb38353 added a dubious coding for a consistency check that there isn't more than one row for a certain tgrelid/tgparentid combination. But we don't check for that explicitly anywhere else, and if we were to do

pgsql: psql \dX: check schema when listing statistics objects

2021-07-26 Thread Tomas Vondra
psql \dX: check schema when listing statistics objects Commit ad600bba04 added psql command \dX listing extended statistics objects, but it failed to consider search_path when selecting the elements so some of the returned elements might be invisible. The visibility was already considered for

pgsql: psql \dX: check schema when listing statistics objects

2021-07-26 Thread Tomas Vondra
psql \dX: check schema when listing statistics objects Commit ad600bba04 added psql command \dX listing extended statistics objects, but it failed to consider search_path when selecting the elements so some of the returned elements might be invisible. The visibility was already considered for

pgsql: Allow numeric scale to be negative or greater than precision.

2021-07-26 Thread Dean Rasheed
Allow numeric scale to be negative or greater than precision. Formerly, when specifying NUMERIC(precision, scale), the scale had to be in the range [0, precision], which was per SQL spec. This commit extends the range of allowed scales to [-1000, 1000], independent of the precision (whose valid

pgsql: doc: Fix command example to run regression tests with PGOPTIONS

2021-07-26 Thread Michael Paquier
doc: Fix command example to run regression tests with PGOPTIONS The documentation mentioned the use of log_checkpoints, that cannot be used in this context. This commit replaces log_checkpoints with force_parallel_mode, a developer option useful to perform checks related to parallelism.

pgsql: doc: Fix command example to run regression tests with PGOPTIONS

2021-07-26 Thread Michael Paquier
doc: Fix command example to run regression tests with PGOPTIONS The documentation mentioned the use of log_checkpoints, that cannot be used in this context. This commit replaces log_checkpoints with force_parallel_mode, a developer option useful to perform checks related to parallelism.