Re: pgsql: Refactor background psql TAP functions

2023-05-19 Thread Daniel Gustafsson
> On 17 May 2023, at 14:38, Daniel Gustafsson > wrote: > >> On 16 May 2023, at 21:43, Daniel Gustafsson >> wrote: >> >>> On 16 May 2023, at 21:04, Damir Belyalov wrote: >> >>> There is another perl module: AdjustUpgrade.pm that is not in Makefile. Do >>> we need it? >> >> Yes, I think it

pgsql: Add 0245f8db3 to .git-blame-ignore-revs.

2023-05-19 Thread Tom Lane
Add 0245f8db3 to .git-blame-ignore-revs. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1c006c067124403d63b6ad3eac687b4217f05691 Modified Files -- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+)

pgsql: Pre-beta mechanical code beautification.

2023-05-19 Thread Tom Lane
Pre-beta mechanical code beautification. Run pgindent, pgperltidy, and reformat-dat-files. This set of diffs is a bit larger than typical. We've updated to pg_bsd_indent 2.1.2, which properly indents variable declarations that have multi-line initialization expressions (the continuation lines ar

pgsql: Make agreed-on updates in perltidy options.

2023-05-19 Thread Tom Lane
Make agreed-on updates in perltidy options. Our standard version of perltidy is now 20230309. Add a --valign-exclusion-list setting to reduce crosstalk between nearby lines of Perl code. Also, update instructions for running pgindent (missed in b16259b3c). Discussion: https://postgr.es/m/2023042

pgsql: Do pre-release housekeeping on catalog data.

2023-05-19 Thread Tom Lane
Do pre-release housekeeping on catalog data. Run renumber_oids.pl to move high-numbered OIDs down, as per pre-beta tasks specified by RELEASE_CHANGES. For reference, the command was ./renumber_oids.pl --first-mapped-oid 8000 --target-oid 6200 Branch -- master Details --- https://git.po

pgsql: Fix thinko in join removal.

2023-05-19 Thread Tom Lane
Fix thinko in join removal. In commit 9df8f903e I (tgl) switched join_is_removable() from using the min relid sets of the join under consideration to using its full syntactic relid sets. This was a mistake, as it allowed join removal in cases where a reference to the join output would survive in

pgsql: Fix misbehavior of EvalPlanQual checks with multiple result rela

2023-05-19 Thread Tom Lane
Fix misbehavior of EvalPlanQual checks with multiple result relations. The idea of EvalPlanQual is that we replace the query's scan of the result relation with a single injected tuple, and see if we get a tuple out, thereby implying that the injected tuple still passes the query quals. (In join c

pgsql: Fix misbehavior of EvalPlanQual checks with multiple result rela

2023-05-19 Thread Tom Lane
Fix misbehavior of EvalPlanQual checks with multiple result relations. The idea of EvalPlanQual is that we replace the query's scan of the result relation with a single injected tuple, and see if we get a tuple out, thereby implying that the injected tuple still passes the query quals. (In join c

pgsql: Fix misbehavior of EvalPlanQual checks with multiple result rela

2023-05-19 Thread Tom Lane
Fix misbehavior of EvalPlanQual checks with multiple result relations. The idea of EvalPlanQual is that we replace the query's scan of the result relation with a single injected tuple, and see if we get a tuple out, thereby implying that the injected tuple still passes the query quals. (In join c

pgsql: Fix misbehavior of EvalPlanQual checks with multiple result rela

2023-05-19 Thread Tom Lane
Fix misbehavior of EvalPlanQual checks with multiple result relations. The idea of EvalPlanQual is that we replace the query's scan of the result relation with a single injected tuple, and see if we get a tuple out, thereby implying that the injected tuple still passes the query quals. (In join c

pgsql: Fix misbehavior of EvalPlanQual checks with multiple result rela

2023-05-19 Thread Tom Lane
Fix misbehavior of EvalPlanQual checks with multiple result relations. The idea of EvalPlanQual is that we replace the query's scan of the result relation with a single injected tuple, and see if we get a tuple out, thereby implying that the injected tuple still passes the query quals. (In join c

pgsql: psql: Tweak xheader_width and pager_min_lines input parsing

2023-05-19 Thread Alvaro Herrera
psql: Tweak xheader_width and pager_min_lines input parsing Don't throw away the previous value when an invalid value is proposed. Discussion: https://postgr.es/m/20230519110205.updpbjiuqgbox6gp@alvherre.pgsql Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ed7e686

pgsql: Message style improvements

2023-05-19 Thread Peter Eisentraut
Message style improvements Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8e7912e73da008862180112cc6ba4d0aa5fa955d Modified Files -- src/backend/access/transam/xlogfuncs.c | 3 ++- src/bin/pg_basebackup/bbstreamer_zstd.c | 4 ++-- src/bin/pg_dump/compr

pgsql: doc: PG 16 relnotes, delete reverted grant, adjust version num

2023-05-19 Thread Bruce Momjian
doc: PG 16 relnotes, delete reverted grant, adjust version num Reported-by: Nathan Bossart, Sehrope Sarkuni Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e5f85744eaa5ca83ff4d27509ed094ca33ed485e Modified Files -- doc/src/sgml/release-16.sgml | 17 +++

pgsql: Allocate hash join files in a separate memory context

2023-05-19 Thread Tomas Vondra
Allocate hash join files in a separate memory context Should a hash join exceed memory limit, the hashtable is split up into multiple batches. The number of batches is doubled each time a given batch is determined not to fit in memory. Each batch file is allocated with a block-sized buffer for buf

pgsql: Describe hash join implementation

2023-05-19 Thread Tomas Vondra
Describe hash join implementation Add a high level description of our implementation of the hybrid hash join algorithm to the block comment in nodeHashjoin.c. Author: Melanie Plageman Reviewed-by: Tomas Vondra Reviewed-by: Jehan-Guillaume de Rorthais Discussion: https://postgr.es/m/20230516160

pgsql: Avoid naming conflict between transactions.sql and namespace.sql

2023-05-19 Thread Tom Lane
Avoid naming conflict between transactions.sql and namespace.sql. Commits 681d9e462 et al added a test case in namespace.sql that implicitly relied on there not being a table "public.abc". However, the concurrently-run transactions.sql test creates precisely such a table, so with the right timing

pgsql: Avoid naming conflict between transactions.sql and namespace.sql

2023-05-19 Thread Tom Lane
Avoid naming conflict between transactions.sql and namespace.sql. Commits 681d9e462 et al added a test case in namespace.sql that implicitly relied on there not being a table "public.abc". However, the concurrently-run transactions.sql test creates precisely such a table, so with the right timing

pgsql: Avoid naming conflict between transactions.sql and namespace.sql

2023-05-19 Thread Tom Lane
Avoid naming conflict between transactions.sql and namespace.sql. Commits 681d9e462 et al added a test case in namespace.sql that implicitly relied on there not being a table "public.abc". However, the concurrently-run transactions.sql test creates precisely such a table, so with the right timing

pgsql: Avoid naming conflict between transactions.sql and namespace.sql

2023-05-19 Thread Tom Lane
Avoid naming conflict between transactions.sql and namespace.sql. Commits 681d9e462 et al added a test case in namespace.sql that implicitly relied on there not being a table "public.abc". However, the concurrently-run transactions.sql test creates precisely such a table, so with the right timing

pgsql: Avoid naming conflict between transactions.sql and namespace.sql

2023-05-19 Thread Tom Lane
Avoid naming conflict between transactions.sql and namespace.sql. Commits 681d9e462 et al added a test case in namespace.sql that implicitly relied on there not being a table "public.abc". However, the concurrently-run transactions.sql test creates precisely such a table, so with the right timing

pgsql: Avoid naming conflict between transactions.sql and namespace.sql

2023-05-19 Thread Tom Lane
Avoid naming conflict between transactions.sql and namespace.sql. Commits 681d9e462 et al added a test case in namespace.sql that implicitly relied on there not being a table "public.abc". However, the concurrently-run transactions.sql test creates precisely such a table, so with the right timing

pgsql: Remove stray mid-sentence tabs in comments

2023-05-19 Thread Peter Eisentraut
Remove stray mid-sentence tabs in comments Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/803b4a26ca3fdddbb6e3ce87a23bfbcc8a8669f3 Modified Files -- src/backend/executor/nodeIncrementalSort.c | 2 +- src/backend/libpq/be-secure-openssl.c | 2 +- src/

pgsql: doc: PG 16 relnotes, merge REINDEX and reindexdb items

2023-05-19 Thread Bruce Momjian
doc: PG 16 relnotes, merge REINDEX and reindexdb items Reported-by: Vibhor Kumar Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/6ff33cdbabdf770ca9d6b417c0687c04b2cd4d36 Modified Files -- doc/src/sgml/release-16.sgml | 21 ++--- 1 file c

pgsql: doc: PG 16 relnotes, add missing parentheses

2023-05-19 Thread Bruce Momjian
doc: PG 16 relnotes, add missing parentheses Reported-by: Hans Buschmann Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1a620cbae5c48dc89f7cb08602c331f5751df71a Modified Files -- doc/src/sgml/release-16.sgml | 2 +- 1 file changed, 1 insertion(+), 1 de

pgsql: Move mdwriteback() to better place

2023-05-19 Thread Peter Eisentraut
Move mdwriteback() to better place The previous order in the file didn't make sense and matched neither the header file nor the smgr API. Discussion: https://www.postgresql.org/message-id/flat/22fed8ba-01c3-2008-a256-4ea912d68fab%40enterprisedb.com Branch -- master Details --- https://

pgsql: Reindent some comments

2023-05-19 Thread Peter Eisentraut
Reindent some comments Most (older) comments in md.c and smgr.c are indented with a leading tab on all lines, which isn't the current style and makes updating the comments a bit annoying. This reindents all these lines with a single space, as is the normal style. This issue exists in various sha