pgsql: Add test for copy of shared dependencies from template database

2021-10-27 Thread Michael Paquier
Add test for copy of shared dependencies from template database As 98ec35b has proved, there has never been any coverage in this area of the code. This commit adds a new TAP test with a template database that includes a small set of shared dependencies copied to a new database. The test is added

pgsql: Clarify that --system reindexes system catalogs *only*

2021-10-27 Thread Magnus Hagander
Clarify that --system reindexes system catalogs *only* Make this more clear both in the help message and docs. Reviewed-By: Michael Paquier Backpatch-through: 9.6 Discussion: https://postgr.es/m/cabuevew6je0wuftlhpkok4+bobudre-fkw3n4ckqgdbmfu4...@mail.gmail.com Branch -- REL_13_STABLE Deta

pgsql: Clarify that --system reindexes system catalogs *only*

2021-10-27 Thread Magnus Hagander
Clarify that --system reindexes system catalogs *only* Make this more clear both in the help message and docs. Reviewed-By: Michael Paquier Backpatch-through: 9.6 Discussion: https://postgr.es/m/cabuevew6je0wuftlhpkok4+bobudre-fkw3n4ckqgdbmfu4...@mail.gmail.com Branch -- REL9_6_STABLE Deta

pgsql: Clarify that --system reindexes system catalogs *only*

2021-10-27 Thread Magnus Hagander
Clarify that --system reindexes system catalogs *only* Make this more clear both in the help message and docs. Reviewed-By: Michael Paquier Backpatch-through: 9.6 Discussion: https://postgr.es/m/cabuevew6je0wuftlhpkok4+bobudre-fkw3n4ckqgdbmfu4...@mail.gmail.com Branch -- REL_11_STABLE Deta

pgsql: Clarify that --system reindexes system catalogs *only*

2021-10-27 Thread Magnus Hagander
Clarify that --system reindexes system catalogs *only* Make this more clear both in the help message and docs. Reviewed-By: Michael Paquier Backpatch-through: 9.6 Discussion: https://postgr.es/m/cabuevew6je0wuftlhpkok4+bobudre-fkw3n4ckqgdbmfu4...@mail.gmail.com Branch -- REL_14_STABLE Deta

pgsql: Clarify that --system reindexes system catalogs *only*

2021-10-27 Thread Magnus Hagander
Clarify that --system reindexes system catalogs *only* Make this more clear both in the help message and docs. Reviewed-By: Michael Paquier Backpatch-through: 9.6 Discussion: https://postgr.es/m/cabuevew6je0wuftlhpkok4+bobudre-fkw3n4ckqgdbmfu4...@mail.gmail.com Branch -- master Details ---

pgsql: Clarify that --system reindexes system catalogs *only*

2021-10-27 Thread Magnus Hagander
Clarify that --system reindexes system catalogs *only* Make this more clear both in the help message and docs. Reviewed-By: Michael Paquier Backpatch-through: 9.6 Discussion: https://postgr.es/m/cabuevew6je0wuftlhpkok4+bobudre-fkw3n4ckqgdbmfu4...@mail.gmail.com Branch -- REL_10_STABLE Deta

pgsql: Clarify that --system reindexes system catalogs *only*

2021-10-27 Thread Magnus Hagander
Clarify that --system reindexes system catalogs *only* Make this more clear both in the help message and docs. Reviewed-By: Michael Paquier Backpatch-through: 9.6 Discussion: https://postgr.es/m/cabuevew6je0wuftlhpkok4+bobudre-fkw3n4ckqgdbmfu4...@mail.gmail.com Branch -- REL_12_STABLE Deta

Re: pgsql: Refactor the sslfiles Makefile target for ease of use

2021-10-27 Thread Daniel Gustafsson
> On 26 Oct 2021, at 19:41, Andres Freund wrote: > This fails during 'make clean' in a vpath build, because sslfiles.mk cannot be > found. Probably just needs It does in fact need that diff, but sslfiles.mk also needs to be taught about the current $(srcdir) to properly function under VPATH for

Re: pgsql: Allow GRANT on pg_log_backend_memory_contexts().

2021-10-27 Thread Jeff Davis
On Wed, 2021-10-27 at 13:15 +0900, Michael Paquier wrote: > I don't think that the documentation part of this commit is correct. > This sentence should have been changed to something like the > following: > "This function is restricted to superusers by default, but other > users > can be granted EX

pgsql: Further harden nbtree posting split code.

2021-10-27 Thread Peter Geoghegan
Further harden nbtree posting split code. Add more defensive checks around posting list split code. These should detect corruption involving duplicate table TIDs earlier and more reliably than any existing check. Follow up to commit 8f72bbac. Discussion: https://postgr.es/m/cah2-wzkrsy_kjyd1_m

pgsql: Further harden nbtree posting split code.

2021-10-27 Thread Peter Geoghegan
Further harden nbtree posting split code. Add more defensive checks around posting list split code. These should detect corruption involving duplicate table TIDs earlier and more reliably than any existing check. Follow up to commit 8f72bbac. Discussion: https://postgr.es/m/cah2-wzkrsy_kjyd1_m

pgsql: Further harden nbtree posting split code.

2021-10-27 Thread Peter Geoghegan
Further harden nbtree posting split code. Add more defensive checks around posting list split code. These should detect corruption involving duplicate table TIDs earlier and more reliably than any existing check. Follow up to commit 8f72bbac. Discussion: https://postgr.es/m/cah2-wzkrsy_kjyd1_m

pgsql: Fix VPATH builds for src/test/ssl targets

2021-10-27 Thread Daniel Gustafsson
Fix VPATH builds for src/test/ssl targets Commit b4c4a00ea refactored the gist of the sslfiles target into a separate makefile in order to override settings in Makefile.global. The invocation of this this file didn't however include the absolute path for VPATH builds, resulting in "make clean" fai

Re: pgsql: Refactor the sslfiles Makefile target for ease of use

2021-10-27 Thread Daniel Gustafsson
> On 27 Oct 2021, at 16:37, Daniel Gustafsson wrote: > >> On 26 Oct 2021, at 19:41, Andres Freund wrote: > >> This fails during 'make clean' in a vpath build, because sslfiles.mk cannot >> be >> found. Probably just needs > > It does in fact need that diff, but sslfiles.mk also needs to be ta

pgsql: Fix ordering of items in nbtree error message.

2021-10-27 Thread Peter Geoghegan
Fix ordering of items in nbtree error message. Oversight in commit a5213adf. Backpatch: 13-, just like commit a5213adf. Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/d5a2ffbce534e4fe9d207da14c9b7cf7a00a7953 Modified Files -- src/backend/access

pgsql: Fix ordering of items in nbtree error message.

2021-10-27 Thread Peter Geoghegan
Fix ordering of items in nbtree error message. Oversight in commit a5213adf. Backpatch: 13-, just like commit a5213adf. Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/6cac3433965ada5ea30fdaa4911eabd0bf59cb68 Modified Files -- src/backend/access

pgsql: Fix ordering of items in nbtree error message.

2021-10-27 Thread Peter Geoghegan
Fix ordering of items in nbtree error message. Oversight in commit a5213adf. Backpatch: 13-, just like commit a5213adf. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c2381b51049bad5dd1863ab1116b315bd7693b7c Modified Files -- src/backend/access/nbtree

pgsql: Fix typos in comments

2021-10-27 Thread Daniel Gustafsson
Fix typos in comments Author: Peter Smith Discussion: https://postgr.es/m/CAHut+PsN_gmKu-KfeEb9NDARoTPbs4AN4PPu=6lzxfzrj13...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8af57ad81578f825ac8c46840c841833db205106 Modified Files -- src

Re: pgsql: Refactor the sslfiles Makefile target for ease of use

2021-10-27 Thread Andres Freund
i, On 2021-10-27 21:57:42 +0200, Daniel Gustafsson wrote: > > On 27 Oct 2021, at 16:37, Daniel Gustafsson wrote: > > > >> On 26 Oct 2021, at 19:41, Andres Freund wrote: > > > >> This fails during 'make clean' in a vpath build, because sslfiles.mk > >> cannot be > >> found. Probably just needs

pgsql: Grant memory views to pg_read_all_stats.

2021-10-27 Thread Jeff Davis
Grant memory views to pg_read_all_stats. Grant privileges on views pg_backend_memory_contexts and pg_shmem_allocations to the role pg_read_all_stats. Also grant on the underlying functions that those views depend on. Author: Bharath Rupireddy Reviewed-by: Nathan Bossart Discussion: https://pos

pgsql: Remove obsolete nbtree LP_DEAD item comments.

2021-10-27 Thread Peter Geoghegan
Remove obsolete nbtree LP_DEAD item comments. Comments above _bt_findinsertloc() that talk about LP_DEAD items are now out of place. We already discuss index tuple deletion at an earlier point in the same comment block. Oversight in commit d168b666. Branch -- master Details --- https:/

Re: pgsql: Allow GRANT on pg_log_backend_memory_contexts().

2021-10-27 Thread Michael Paquier
On Wed, Oct 27, 2021 at 08:12:23AM -0700, Jeff Davis wrote: > It looks like several people missed that, so perhaps we should get rid > of that statement at the top, and move it in to each function > description? Oops, you are right, sorry about the useless noise. With a table that includes all th

pgsql: doc: Fix link to SELinux user guide in sepgsql page

2021-10-27 Thread Michael Paquier
doc: Fix link to SELinux user guide in sepgsql page Reported-by: Anton Voloshin Discussion: https://postgr.es/m/[email protected] Backpatch-through: 10 Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/c7ddbc351d9cff4f8a63155f

pgsql: doc: Fix link to SELinux user guide in sepgsql page

2021-10-27 Thread Michael Paquier
doc: Fix link to SELinux user guide in sepgsql page Reported-by: Anton Voloshin Discussion: https://postgr.es/m/[email protected] Backpatch-through: 10 Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/da7d0fb159460ddb37798e91

pgsql: doc: Fix link to SELinux user guide in sepgsql page

2021-10-27 Thread Michael Paquier
doc: Fix link to SELinux user guide in sepgsql page Reported-by: Anton Voloshin Discussion: https://postgr.es/m/[email protected] Backpatch-through: 10 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/cc1853b30048307d93f8aa30f4d64f8

pgsql: doc: Fix link to SELinux user guide in sepgsql page

2021-10-27 Thread Michael Paquier
doc: Fix link to SELinux user guide in sepgsql page Reported-by: Anton Voloshin Discussion: https://postgr.es/m/[email protected] Backpatch-through: 10 Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0a75e1186afe58e140cc5eb0

pgsql: doc: Fix link to SELinux user guide in sepgsql page

2021-10-27 Thread Michael Paquier
doc: Fix link to SELinux user guide in sepgsql page Reported-by: Anton Voloshin Discussion: https://postgr.es/m/[email protected] Backpatch-through: 10 Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/4badc594d6396fb53582d154

pgsql: doc: Fix link to SELinux user guide in sepgsql page

2021-10-27 Thread Michael Paquier
doc: Fix link to SELinux user guide in sepgsql page Reported-by: Anton Voloshin Discussion: https://postgr.es/m/[email protected] Backpatch-through: 10 Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/1d2a7b51509f8b3453d2b04e

pgsql: Add TAP test for archive_cleanup_command and recovery_end_comman

2021-10-27 Thread Michael Paquier
Add TAP test for archive_cleanup_command and recovery_end_command This adds tests checking for the execution of both commands. The recovery test 002_archiving.pl is nicely adapted to that, as promotion is triggered already twice there, and even if any of those commands fail they don't affect reco