pgsql: Use REGBUF_NO_CHANGE at one more place in the hash index.

2023-11-13 Thread Amit Kapila
Use REGBUF_NO_CHANGE at one more place in the hash index. Commit 00d7fb5e2e started to use REGBUF_NO_CHANGE at a few places in the code where we register the buffer before marking it dirty but missed updating one of the code flows in the hash index where we free the overflow page without any live

pgsql: Remove incorrect file reference in comment.

2023-11-13 Thread Etsuro Fujita
Remove incorrect file reference in comment. Commit b7eda3e0e moved XidInMVCCSnapshot() from tqual.c into snapmgr.c, but follow-up commit c91560def incorrectly updated this reference. We could fix it, but as pointed out by Daniel Gustafsson, 1) the reader can easily find the file that contains the

pgsql: Remove incorrect file reference in comment.

2023-11-13 Thread Etsuro Fujita
Remove incorrect file reference in comment. Commit b7eda3e0e moved XidInMVCCSnapshot() from tqual.c into snapmgr.c, but follow-up commit c91560def incorrectly updated this reference. We could fix it, but as pointed out by Daniel Gustafsson, 1) the reader can easily find the file that contains the

pgsql: Remove incorrect file reference in comment.

2023-11-13 Thread Etsuro Fujita
Remove incorrect file reference in comment. Commit b7eda3e0e moved XidInMVCCSnapshot() from tqual.c into snapmgr.c, but follow-up commit c91560def incorrectly updated this reference. We could fix it, but as pointed out by Daniel Gustafsson, 1) the reader can easily find the file that contains the

pgsql: Remove incorrect file reference in comment.

2023-11-13 Thread Etsuro Fujita
Remove incorrect file reference in comment. Commit b7eda3e0e moved XidInMVCCSnapshot() from tqual.c into snapmgr.c, but follow-up commit c91560def incorrectly updated this reference. We could fix it, but as pointed out by Daniel Gustafsson, 1) the reader can easily find the file that contains the

pgsql: Remove incorrect file reference in comment.

2023-11-13 Thread Etsuro Fujita
Remove incorrect file reference in comment. Commit b7eda3e0e moved XidInMVCCSnapshot() from tqual.c into snapmgr.c, but follow-up commit c91560def incorrectly updated this reference. We could fix it, but as pointed out by Daniel Gustafsson, 1) the reader can easily find the file that contains the

pgsql: Remove incorrect file reference in comment.

2023-11-13 Thread Etsuro Fujita
Remove incorrect file reference in comment. Commit b7eda3e0e moved XidInMVCCSnapshot() from tqual.c into snapmgr.c, but follow-up commit c91560def incorrectly updated this reference. We could fix it, but as pointed out by Daniel Gustafsson, 1) the reader can easily find the file that contains the

pgsql: doc: Add missing semicolon in example

2023-11-13 Thread Daniel Gustafsson
doc: Add missing semicolon in example One of the examples on the SELECT page was missing a semicolon from a listing which has the look and feel of being a psql session. This adds the missing semicolon and also removes the newline between the query and results to match the other examples nearby. B

pgsql: doc: Add missing semicolon in example

2023-11-13 Thread Daniel Gustafsson
doc: Add missing semicolon in example One of the examples on the SELECT page was missing a semicolon from a listing which has the look and feel of being a psql session. This adds the missing semicolon and also removes the newline between the query and results to match the other examples nearby. B

pgsql: doc: Add missing semicolon in example

2023-11-13 Thread Daniel Gustafsson
doc: Add missing semicolon in example One of the examples on the SELECT page was missing a semicolon from a listing which has the look and feel of being a psql session. This adds the missing semicolon and also removes the newline between the query and results to match the other examples nearby. B

pgsql: doc: Add missing semicolon in example

2023-11-13 Thread Daniel Gustafsson
doc: Add missing semicolon in example One of the examples on the SELECT page was missing a semicolon from a listing which has the look and feel of being a psql session. This adds the missing semicolon and also removes the newline between the query and results to match the other examples nearby. B

pgsql: doc: Add missing semicolon in example

2023-11-13 Thread Daniel Gustafsson
doc: Add missing semicolon in example One of the examples on the SELECT page was missing a semicolon from a listing which has the look and feel of being a psql session. This adds the missing semicolon and also removes the newline between the query and results to match the other examples nearby. B

pgsql: doc: Add missing semicolon in example

2023-11-13 Thread Daniel Gustafsson
doc: Add missing semicolon in example One of the examples on the SELECT page was missing a semicolon from a listing which has the look and feel of being a psql session. This adds the missing semicolon and also removes the newline between the query and results to match the other examples nearby. B

pgsql: Don't release index root page pin in ginFindParents().

2023-11-13 Thread Tom Lane
Don't release index root page pin in ginFindParents(). It's clearly stated in the comments that ginFindParents() must keep the pin on the index's root page that's associated with the topmost GinBtreeStack item. However, the code path for the case that the desired downlink has been pushed down to

pgsql: Don't release index root page pin in ginFindParents().

2023-11-13 Thread Tom Lane
Don't release index root page pin in ginFindParents(). It's clearly stated in the comments that ginFindParents() must keep the pin on the index's root page that's associated with the topmost GinBtreeStack item. However, the code path for the case that the desired downlink has been pushed down to

pgsql: Don't release index root page pin in ginFindParents().

2023-11-13 Thread Tom Lane
Don't release index root page pin in ginFindParents(). It's clearly stated in the comments that ginFindParents() must keep the pin on the index's root page that's associated with the topmost GinBtreeStack item. However, the code path for the case that the desired downlink has been pushed down to

pgsql: Don't release index root page pin in ginFindParents().

2023-11-13 Thread Tom Lane
Don't release index root page pin in ginFindParents(). It's clearly stated in the comments that ginFindParents() must keep the pin on the index's root page that's associated with the topmost GinBtreeStack item. However, the code path for the case that the desired downlink has been pushed down to

pgsql: Don't release index root page pin in ginFindParents().

2023-11-13 Thread Tom Lane
Don't release index root page pin in ginFindParents(). It's clearly stated in the comments that ginFindParents() must keep the pin on the index's root page that's associated with the topmost GinBtreeStack item. However, the code path for the case that the desired downlink has been pushed down to

pgsql: Don't release index root page pin in ginFindParents().

2023-11-13 Thread Tom Lane
Don't release index root page pin in ginFindParents(). It's clearly stated in the comments that ginFindParents() must keep the pin on the index's root page that's associated with the topmost GinBtreeStack item. However, the code path for the case that the desired downlink has been pushed down to

pgsql: doc: remove RUNAS instructions for pg_upgrade on Windows

2023-11-13 Thread Bruce Momjian
doc: remove RUNAS instructions for pg_upgrade on Windows None of our other tools have such a recommendation. Reported-by: David G. Johnston Discussion: https://postgr.es/m/CAKFQuwbpqP_DB8WhthnwbsUOT_qB=ak3ppbsyvenqfh...@mail.gmail.com Backpatch-through: master Branch -- master Detai

pgsql: Add error about the use of FREEZE in COPY TO

2023-11-13 Thread Bruce Momjian
Add error about the use of FREEZE in COPY TO Also clarify some other error wording. Reported-by: Kyotaro Horiguchi Discussion: https://postgr.es/m/20220802.133046.1941977979333284049.horikyota@gmail.com Backpatch-through: master Branch -- master Details --- https://git.postgresql

pgsql: doc: correct description of libpq's PQsetnonblocking() mode

2023-11-13 Thread Bruce Momjian
doc: correct description of libpq's PQsetnonblocking() mode Reported-by: Yugo NAGATA Discussion: https://postgr.es/m/20210713115949.702986955f8ccf23fa810...@sraoss.co.jp Backpatch-through: master Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/57d6a198c9f62c5379

pgsql: Improve readability and error detection of array_in().

2023-11-13 Thread Tom Lane
Improve readability and error detection of array_in(). Rewrite array_in() and its subroutines so that we make only one pass over the input text, rather than two. This requires potentially re-pallocing the working arrays values[] and nulls[] larger than our initial guess, but that cost will hopefu

pgsql: doc: correct description of libpq's PQsetnonblocking() mode

2023-11-13 Thread Bruce Momjian
doc: correct description of libpq's PQsetnonblocking() mode Reported-by: Yugo NAGATA Discussion: https://postgr.es/m/20210713115949.702986955f8ccf23fa810...@sraoss.co.jp Backpatch-through: 12-16, master already done Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/co

pgsql: doc: correct description of libpq's PQsetnonblocking() mode

2023-11-13 Thread Bruce Momjian
doc: correct description of libpq's PQsetnonblocking() mode Reported-by: Yugo NAGATA Discussion: https://postgr.es/m/20210713115949.702986955f8ccf23fa810...@sraoss.co.jp Backpatch-through: 12-16, master already done Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/co

pgsql: doc: correct description of libpq's PQsetnonblocking() mode

2023-11-13 Thread Bruce Momjian
doc: correct description of libpq's PQsetnonblocking() mode Reported-by: Yugo NAGATA Discussion: https://postgr.es/m/20210713115949.702986955f8ccf23fa810...@sraoss.co.jp Backpatch-through: 12-16, master already done Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/co

pgsql: doc: correct description of libpq's PQsetnonblocking() mode

2023-11-13 Thread Bruce Momjian
doc: correct description of libpq's PQsetnonblocking() mode Reported-by: Yugo NAGATA Discussion: https://postgr.es/m/20210713115949.702986955f8ccf23fa810...@sraoss.co.jp Backpatch-through: 12-16, master already done Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/co

pgsql: doc: correct description of libpq's PQsetnonblocking() mode

2023-11-13 Thread Bruce Momjian
doc: correct description of libpq's PQsetnonblocking() mode Reported-by: Yugo NAGATA Discussion: https://postgr.es/m/20210713115949.702986955f8ccf23fa810...@sraoss.co.jp Backpatch-through: 12-16, master already done Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/co

pgsql: doc: restructure ALTER DEFAULT PRIVILEGES

2023-11-13 Thread Bruce Momjian
doc: restructure ALTER DEFAULT PRIVILEGES Clarify that default privileges are not inherited and reorder paragraphs. This is a follow up to a recent ALTER DEFAULT PRIVILEGES doc patch. Reported-by: Sanjay Minni Diagnosed-by: AMpxBo=M35hcH1g4Vg=krj0-77fojcvdrdivf5ksoadog-l...@mail.gmail.com Co-

pgsql: doc: restructure ALTER DEFAULT PRIVILEGES

2023-11-13 Thread Bruce Momjian
doc: restructure ALTER DEFAULT PRIVILEGES Clarify that default privileges are not inherited and reorder paragraphs. This is a follow up to a recent ALTER DEFAULT PRIVILEGES doc patch. Reported-by: Sanjay Minni Diagnosed-by: AMpxBo=M35hcH1g4Vg=krj0-77fojcvdrdivf5ksoadog-l...@mail.gmail.com Co-

Re: pgsql: doc: restructure ALTER DEFAULT PRIVILEGES

2023-11-13 Thread Bruce Momjian
On Mon, Nov 13, 2023 at 07:28:01PM +, Bruce Momjian wrote: > doc: restructure ALTER DEFAULT PRIVILEGES > > Clarify that default privileges are not inherited and reorder > paragraphs. This is a follow up to a recent ALTER DEFAULT PRIVILEGES > doc patch. > > Reported-by: Sanjay Minni > > Dia

pgsql: Adjust file_fdw regression tests for acc95f29ef FREEZE commit

2023-11-13 Thread Bruce Momjian
Adjust file_fdw regression tests for acc95f29ef FREEZE commit Reported-by: Tom Lane Discussion: https://postgr.es/m/2161529.1699899...@sss.pgh.pa.us Backpatch-through: master Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e61a82c949353d9684d037a9a404fbb26b651535

pgsql: doc: clarify that pg_global can _only_ be used for system tabs.

2023-11-13 Thread Bruce Momjian
doc: clarify that pg_global can _only_ be used for system tabs. Reported-by: zhoushulin1...@gmail.com Discussion: https://postgr.es/m/160499688847.25495.8682880307938679...@wrigleys.postgresql.org Backpatch-through: master Branch -- master Details --- https://git.postgresql.org/pg/co

pgsql: doc: move ROW IS NULL examples to a different chapter

2023-11-13 Thread Bruce Momjian
doc: move ROW IS NULL examples to a different chapter Also add examples. Reported-by: Wolfgang Walther Discussion: https://postgr.es/m/21ff8e9c-627a-f949-fb00-a41b9ddcc...@technowledgy.de Backpatch-through: master Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Improve default and empty privilege outputs in psql.

2023-11-13 Thread Tom Lane
Improve default and empty privilege outputs in psql. Default privileges are represented as NULL::aclitem[] in catalog ACL columns, while revoking all privileges leaves an empty aclitem[]. These two cases used to produce identical output in psql meta-commands like \dp. Using something like "\pset

pgsql: doc: clarify handling of range upper/lower/upper_inf/lower_inf()

2023-11-13 Thread Bruce Momjian
doc: clarify handling of range upper/lower/upper_inf/lower_inf() Clarify handling of infinite range bounds. Reported-by: jani.rahk...@iki.fi Discussion: https://postgr.es/m/160508672127.25505.8356390205508789...@wrigleys.postgresql.org Co-authored-by: Laurenz Albe Backpatch-through: 16 Branc

pgsql: doc: clarify handling of range upper/lower/upper_inf/lower_inf()

2023-11-13 Thread Bruce Momjian
doc: clarify handling of range upper/lower/upper_inf/lower_inf() Clarify handling of infinite range bounds. Reported-by: jani.rahk...@iki.fi Discussion: https://postgr.es/m/160508672127.25505.8356390205508789...@wrigleys.postgresql.org Co-authored-by: Laurenz Albe Backpatch-through: 16 Branc

pgsql: psql: improve description consistency of \dTS data types

2023-11-13 Thread Bruce Momjian
psql: improve description consistency of \dTS data types This was done particularly for geometric data types. Reported-by: Christoph Berg Discussion: https://postgr.es/m/ygi8leuk0wvmn...@msg.df7cb.de Co-authored-by: Kyotaro Horiguchi Backpatch-through: master Branch -- master Details --

pgsql: doc: clarify handling of ts_headline() operators & extra words

2023-11-13 Thread Bruce Momjian
doc: clarify handling of ts_headline() operators & extra words Reported-by: Ngigi Waithaka & Alex Malek Bug: 15172 Discussion: https://postgr.es/m/152461454026.19805.6310947081647212...@wrigleys.postgresql.org Backpatch-through: 16 Branch -- master Details --- https://git.postgresql

pgsql: doc: clarify handling of ts_headline() operators & extra words

2023-11-13 Thread Bruce Momjian
doc: clarify handling of ts_headline() operators & extra words Reported-by: Ngigi Waithaka & Alex Malek Bug: 15172 Discussion: https://postgr.es/m/152461454026.19805.6310947081647212...@wrigleys.postgresql.org Backpatch-through: 16 Branch -- REL_16_STABLE Details --- https://git.pos

pgsql: Don't try to dump RLS policies or security labels for extension

2023-11-13 Thread Tom Lane
Don't try to dump RLS policies or security labels for extension objects. checkExtensionMembership() set the DUMP_COMPONENT_SECLABEL and DUMP_COMPONENT_POLICY flags for extension member objects, even though we lack any infrastructure for tracking extensions' initial settings of these properties. T

pgsql: Don't try to dump RLS policies or security labels for extension

2023-11-13 Thread Tom Lane
Don't try to dump RLS policies or security labels for extension objects. checkExtensionMembership() set the DUMP_COMPONENT_SECLABEL and DUMP_COMPONENT_POLICY flags for extension member objects, even though we lack any infrastructure for tracking extensions' initial settings of these properties. T

pgsql: Don't try to dump RLS policies or security labels for extension

2023-11-13 Thread Tom Lane
Don't try to dump RLS policies or security labels for extension objects. checkExtensionMembership() set the DUMP_COMPONENT_SECLABEL and DUMP_COMPONENT_POLICY flags for extension member objects, even though we lack any infrastructure for tracking extensions' initial settings of these properties. T

pgsql: Don't try to dump RLS policies or security labels for extension

2023-11-13 Thread Tom Lane
Don't try to dump RLS policies or security labels for extension objects. checkExtensionMembership() set the DUMP_COMPONENT_SECLABEL and DUMP_COMPONENT_POLICY flags for extension member objects, even though we lack any infrastructure for tracking extensions' initial settings of these properties. T

pgsql: Don't try to dump RLS policies or security labels for extension

2023-11-13 Thread Tom Lane
Don't try to dump RLS policies or security labels for extension objects. checkExtensionMembership() set the DUMP_COMPONENT_SECLABEL and DUMP_COMPONENT_POLICY flags for extension member objects, even though we lack any infrastructure for tracking extensions' initial settings of these properties. T

pgsql: Don't try to dump RLS policies or security labels for extension

2023-11-13 Thread Tom Lane
Don't try to dump RLS policies or security labels for extension objects. checkExtensionMembership() set the DUMP_COMPONENT_SECLABEL and DUMP_COMPONENT_POLICY flags for extension member objects, even though we lack any infrastructure for tracking extensions' initial settings of these properties. T

pgsql: Add support for pg_stat_reset_slru without argument

2023-11-13 Thread Michael Paquier
Add support for pg_stat_reset_slru without argument pg_stat_reset_slru currently requires an input argument, either: - NULL to reset the SLRU counters of everything. - A specific value to reset a single SLRU cache. This commit adds support for a new pattern: pg_stat_reset_slru without any argumen

pgsql: Allow new role 'regress_dump_login_role' to log in under SSPI.

2023-11-13 Thread Tom Lane
Allow new role 'regress_dump_login_role' to log in under SSPI. Semi-blind attempt to fix a70f2a57f to work on Windows, along the same lines as 5253519b2. Per buildfarm. Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/7836f6838d8c5c976fc4ee0dffd02ecd3ae7d106

pgsql: Allow new role 'regress_dump_login_role' to log in under SSPI.

2023-11-13 Thread Tom Lane
Allow new role 'regress_dump_login_role' to log in under SSPI. Semi-blind attempt to fix a70f2a57f to work on Windows, along the same lines as 5253519b2. Per buildfarm. Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/63c1b4d88a6fb268cd6cd3b177554257d6c40955

pgsql: Allow new role 'regress_dump_login_role' to log in under SSPI.

2023-11-13 Thread Tom Lane
Allow new role 'regress_dump_login_role' to log in under SSPI. Semi-blind attempt to fix a70f2a57f to work on Windows, along the same lines as 5253519b2. Per buildfarm. Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/c532be99d7b8101561d9b99b889ccc9ee6f88333

pgsql: Allow new role 'regress_dump_login_role' to log in under SSPI.

2023-11-13 Thread Tom Lane
Allow new role 'regress_dump_login_role' to log in under SSPI. Semi-blind attempt to fix a70f2a57f to work on Windows, along the same lines as 5253519b2. Per buildfarm. Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/f1674ac6b05b39c979f245947ad98fe306a2d4a0

pgsql: Allow new role 'regress_dump_login_role' to log in under SSPI.

2023-11-13 Thread Tom Lane
Allow new role 'regress_dump_login_role' to log in under SSPI. Semi-blind attempt to fix a70f2a57f to work on Windows, along the same lines as 5253519b2. Per buildfarm. Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e43790342be29addaa843b80e8f58334fe7346d3

pgsql: Allow new role 'regress_dump_login_role' to log in under SSPI.

2023-11-13 Thread Tom Lane
Allow new role 'regress_dump_login_role' to log in under SSPI. Semi-blind attempt to fix a70f2a57f to work on Windows, along the same lines as 5253519b2. Per buildfarm. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1e3f461e825fe61f741b291c91b30967739a90d0 Modifi