pgsql: Attempt to fix unstable Result Cache regression tests

2021-04-01 Thread David Rowley
Attempt to fix unstable Result Cache regression tests force_parallel_mode = regress is causing a few more problems than I thought. It seems that both the leader and the single worker can contribute to the execution. I had mistakenly thought that only the worker process would do any work. Since i

pgsql: doc: mention that intervening major releases can be skipped

2021-04-01 Thread Bruce Momjian
doc: mention that intervening major releases can be skipped Also mention that you should read the intervening major releases notes. This change was also applied to the website. Discussion: https://postgr.es/m/20210330144949.ga8...@momjian.us Backpatch-through: 9.6 Branch -- REL_10_STABLE

pgsql: doc: mention that intervening major releases can be skipped

2021-04-01 Thread Bruce Momjian
doc: mention that intervening major releases can be skipped Also mention that you should read the intervening major releases notes. This change was also applied to the website. Discussion: https://postgr.es/m/20210330144949.ga8...@momjian.us Backpatch-through: 9.6 Branch -- REL_13_STABLE

pgsql: doc: mention that intervening major releases can be skipped

2021-04-01 Thread Bruce Momjian
doc: mention that intervening major releases can be skipped Also mention that you should read the intervening major releases notes. This change was also applied to the website. Discussion: https://postgr.es/m/20210330144949.ga8...@momjian.us Backpatch-through: 9.6 Branch -- REL9_6_STABLE

pgsql: doc: mention that intervening major releases can be skipped

2021-04-01 Thread Bruce Momjian
doc: mention that intervening major releases can be skipped Also mention that you should read the intervening major releases notes. This change was also applied to the website. Discussion: https://postgr.es/m/20210330144949.ga8...@momjian.us Backpatch-through: 9.6 Branch -- REL_12_STABLE

pgsql: doc: mention that intervening major releases can be skipped

2021-04-01 Thread Bruce Momjian
doc: mention that intervening major releases can be skipped Also mention that you should read the intervening major releases notes. This change was also applied to the website. Discussion: https://postgr.es/m/20210330144949.ga8...@momjian.us Backpatch-through: 9.6 Branch -- REL_11_STABLE

pgsql: doc: mention that intervening major releases can be skipped

2021-04-01 Thread Bruce Momjian
doc: mention that intervening major releases can be skipped Also mention that you should read the intervening major releases notes. This change was also applied to the website. Discussion: https://postgr.es/m/20210330144949.ga8...@momjian.us Backpatch-through: 9.6 Branch -- master Details

pgsql: Add Result Cache executor node (take 2)

2021-04-01 Thread David Rowley
Add Result Cache executor node (take 2) Here we add a new executor node type named "Result Cache". The planner can include this node type in the plan to have the executor cache the results from the inner side of parameterized nested loop joins. This allows caching of tuples for sets of parameter

pgsql: Improve stability of test with vacuum_truncate in reloptions.sql

2021-04-01 Thread Michael Paquier
Improve stability of test with vacuum_truncate in reloptions.sql This test has been using a simple VACUUM with pg_relation_size() to check if a relation gets physically truncated or not, but forgot the fact that some concurrent activity, like checkpoint buffer writes, could cause some pages to be

pgsql: Improve stability of test with vacuum_truncate in reloptions.sql

2021-04-01 Thread Michael Paquier
Improve stability of test with vacuum_truncate in reloptions.sql This test has been using a simple VACUUM with pg_relation_size() to check if a relation gets physically truncated or not, but forgot the fact that some concurrent activity, like checkpoint buffer writes, could cause some pages to be

pgsql: Improve stability of test with vacuum_truncate in reloptions.sql

2021-04-01 Thread Michael Paquier
Improve stability of test with vacuum_truncate in reloptions.sql This test has been using a simple VACUUM with pg_relation_size() to check if a relation gets physically truncated or not, but forgot the fact that some concurrent activity, like checkpoint buffer writes, could cause some pages to be

pgsql: Rethink handling of pass-by-value leaf datums in SP-GiST.

2021-04-01 Thread Tom Lane
Rethink handling of pass-by-value leaf datums in SP-GiST. The existing convention in SP-GiST is that any pass-by-value datatype is stored in Datum representation, i.e. it's of width sizeof(Datum) even when typlen is less than that. This is okay, or at least it's too late to change it, for prefix

Re: pgsql: Allow matching the DN of a client certificate for authentication

2021-04-01 Thread Daniel Gustafsson
> On 29 Mar 2021, at 21:50, Andrew Dunstan wrote: > > Allow matching the DN of a client certificate for authentication A small typo snuck in with this commit: diff --git a/src/test/ssl/Makefile b/src/test/ssl/Makefile index 0d6d237e7c..ecc3fe1f2e 100644 --- a/src/test/ssl/Makefile +++ b/src/tes

pgsql: Rename Default Roles to Predefined Roles

2021-04-01 Thread Stephen Frost
Rename Default Roles to Predefined Roles The term 'default roles' wasn't quite apt as these roles aren't able to be modified or removed after installation, so rename them to be 'Predefined Roles' instead, adding an entry into the newly added Obsolete Appendix to help users of current releases find

pgsql: Fix setvbuf()-induced crash in libpq_pipeline

2021-04-01 Thread Alvaro Herrera
Fix setvbuf()-induced crash in libpq_pipeline Windows doesn't like setvbuf(..., _IOLBF) and crashes if you use it, which has been causing the libpq_pipeline failures all along ... and our own port.h has known about it for a long time: it offers PG_IOLBF that's defined to _IONBF on that platform.

Re: pgsql: Allow matching the DN of a client certificate for authentication

2021-04-01 Thread Andrew Dunstan
On 3/29/21 3:50 PM, Andrew Dunstan wrote: > Allow matching the DN of a client certificate for authentication > > Currently we only recognize the Common Name (CN) of a certificate's > subject to be matched against the user name. Thus certificates with > subjects '/OU=eng/CN=fred' and '/OU=sales/CN

pgsql: amcheck: Fix verify_heapam's tuple visibility checking rules.

2021-04-01 Thread Robert Haas
amcheck: Fix verify_heapam's tuple visibility checking rules. We now follow the order of checks from HeapTupleSatisfies* more closely to avoid coming to erroneous conclusions. Mark Dilger and Robert Haas Discussion: http://postgr.es/m/ca+tgmob6sii0ytvulyj0vq4w6zbmj7zuhddl3b+skdi9z9n...@mail.gma

pgsql: Fix pg_restore's misdesigned code for detecting archive file for

2021-04-01 Thread Tom Lane
Fix pg_restore's misdesigned code for detecting archive file format. Despite the clear comments pointing out that the duplicative code segments in ReadHead() and _discoverArchiveFormat() needed to be in sync, they were not: the latter did not bother to apply any of the sanity checks in the former.

pgsql: Fix pg_restore's misdesigned code for detecting archive file for

2021-04-01 Thread Tom Lane
Fix pg_restore's misdesigned code for detecting archive file format. Despite the clear comments pointing out that the duplicative code segments in ReadHead() and _discoverArchiveFormat() needed to be in sync, they were not: the latter did not bother to apply any of the sanity checks in the former.

pgsql: Fix pg_restore's misdesigned code for detecting archive file for

2021-04-01 Thread Tom Lane
Fix pg_restore's misdesigned code for detecting archive file format. Despite the clear comments pointing out that the duplicative code segments in ReadHead() and _discoverArchiveFormat() needed to be in sync, they were not: the latter did not bother to apply any of the sanity checks in the former.

pgsql: Fix pg_restore's misdesigned code for detecting archive file for

2021-04-01 Thread Tom Lane
Fix pg_restore's misdesigned code for detecting archive file format. Despite the clear comments pointing out that the duplicative code segments in ReadHead() and _discoverArchiveFormat() needed to be in sync, they were not: the latter did not bother to apply any of the sanity checks in the former.

pgsql: Fix pg_restore's misdesigned code for detecting archive file for

2021-04-01 Thread Tom Lane
Fix pg_restore's misdesigned code for detecting archive file format. Despite the clear comments pointing out that the duplicative code segments in ReadHead() and _discoverArchiveFormat() needed to be in sync, they were not: the latter did not bother to apply any of the sanity checks in the former.

pgsql: Fix pg_restore's misdesigned code for detecting archive file for

2021-04-01 Thread Tom Lane
Fix pg_restore's misdesigned code for detecting archive file format. Despite the clear comments pointing out that the duplicative code segments in ReadHead() and _discoverArchiveFormat() needed to be in sync, they were not: the latter did not bother to apply any of the sanity checks in the former.

pgsql: Fix internal extract(timezone_minute) formulas

2021-04-01 Thread Peter Eisentraut
Fix internal extract(timezone_minute) formulas Through various refactorings over time, the extract(timezone_minute from time with time zone) and extract(timezone_minute from timestamp with time zone) implementations ended up with two different but equally nonsensical formulas by using SECS_PER_MIN

pgsql: libpq_pipeline: Must strdup(optarg) to avoid crash

2021-04-01 Thread Alvaro Herrera
libpq_pipeline: Must strdup(optarg) to avoid crash I forgot to strdup() when processing argv[]. Apparently many platforms hide this mistake from users, but in those that don't you may get a program crash. Repair. Per buildfarm member drongo, which is the only one in all the buildfarm manifestin

pgsql: Add 'noError' argument to encoding conversion functions.

2021-04-01 Thread Heikki Linnakangas
Add 'noError' argument to encoding conversion functions. With the 'noError' argument, you can try to convert a buffer without knowing the character boundaries beforehand. The functions now need to return the number of input bytes successfully converted. This is is a backwards-incompatible change,

pgsql: Do COPY FROM encoding conversion/verification in larger chunks.

2021-04-01 Thread Heikki Linnakangas
Do COPY FROM encoding conversion/verification in larger chunks. This gives a small performance gain, by reducing the number of calls to the conversion/verification function, and letting it work with larger inputs. Also, reorganizing the input pipeline makes it easier to parallelize the input parsi

pgsql: Make extract(timetz) tests a bit more interesting

2021-04-01 Thread Peter Eisentraut
Make extract(timetz) tests a bit more interesting Use a time zone offset with nonzero minutes to make the timezone_minute test meaningful. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e2639a767bfa1afebaf1877515a1187feb393443 Modified Files -- src/tes