pgsql: psql: Improve tab completion for GRANT/REVOKE

2022-11-17 Thread Michael Paquier
psql: Improve tab completion for GRANT/REVOKE This commit improves the handling of the following clauses: - Addition of "CREATE" for ALTER DEFAULT PRIVILEGES .. GRANT/REVOKE. - Addition of GRANT|ADMIN|INHERIT OPTION FOR for REVOKE, with some completion for roles, INHERIT being added recently by e3

pgsql: ci: Add task testing windows with mingw

2022-11-17 Thread Andres Freund
ci: Add task testing windows with mingw For now the task has been set to be manually triggered, as we are already limited by the amount of CI time available for windows, particularly on cfbot. Author: Melih Mutlu Reviewed-by: Andrew Dunstan Reviewed-by: Andres Freund Reviewed-by: Justin Pryzby

pgsql: Standardize rmgrdesc recovery conflict XID output.

2022-11-17 Thread Peter Geoghegan
Standardize rmgrdesc recovery conflict XID output. Standardize on the name snapshotConflictHorizon for all XID fields from WAL records that generate recovery conflicts when in hot standby mode. This supersedes the previous latestRemovedXid naming convention. The new naming convention places empha

pgsql: Replace RelationOpenSmgr() with RelationGetSmgr().

2022-11-17 Thread Tom Lane
Replace RelationOpenSmgr() with RelationGetSmgr(). This is a back-patch of the v15-era commit f10f0ae42 into older supported branches. The idea is to design out bugs in which an ill-timed relcache flush clears rel->rd_smgr partway through some code sequence that wasn't expecting that. We had ano

pgsql: Replace RelationOpenSmgr() with RelationGetSmgr().

2022-11-17 Thread Tom Lane
Replace RelationOpenSmgr() with RelationGetSmgr(). This is a back-patch of the v15-era commit f10f0ae42 into older supported branches. The idea is to design out bugs in which an ill-timed relcache flush clears rel->rd_smgr partway through some code sequence that wasn't expecting that. We had ano

pgsql: Replace RelationOpenSmgr() with RelationGetSmgr().

2022-11-17 Thread Tom Lane
Replace RelationOpenSmgr() with RelationGetSmgr(). This is a back-patch of the v15-era commit f10f0ae42 into older supported branches. The idea is to design out bugs in which an ill-timed relcache flush clears rel->rd_smgr partway through some code sequence that wasn't expecting that. We had ano

pgsql: Replace RelationOpenSmgr() with RelationGetSmgr().

2022-11-17 Thread Tom Lane
Replace RelationOpenSmgr() with RelationGetSmgr(). This is a back-patch of the v15-era commit f10f0ae42 into older supported branches. The idea is to design out bugs in which an ill-timed relcache flush clears rel->rd_smgr partway through some code sequence that wasn't expecting that. We had ano

pgsql: Fix MERGE tuple count with DO NOTHING

2022-11-17 Thread Alvaro Herrera
Fix MERGE tuple count with DO NOTHING Reporting tuples for which nothing is done is useless and goes against the documented behavior, so don't do it. Backpatch to 15. Reported by: Luca Ferrari Discussion: https://postgr.es/m/cakoxk+42mmacuh6s8xzasqkizbzrtoga6g1ujzcp75ncxhs...@mail.gmail.com Br

pgsql: Fix MERGE tuple count with DO NOTHING

2022-11-17 Thread Alvaro Herrera
Fix MERGE tuple count with DO NOTHING Reporting tuples for which nothing is done is useless and goes against the documented behavior, so don't do it. Backpatch to 15. Reported by: Luca Ferrari Discussion: https://postgr.es/m/cakoxk+42mmacuh6s8xzasqkizbzrtoga6g1ujzcp75ncxhs...@mail.gmail.com Br

pgsql: Use correct type name in comments about freezing.

2022-11-17 Thread Peter Geoghegan
Use correct type name in comments about freezing. Oversight in commit 9e540599, which added freeze plan deduplication. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/813492dacceecb752725b7e370ac7f5748b1edf9 Modified Files -- src/backend/access/heap/hea

pgsql: Account for IPC::Run::result() Windows behavior change.

2022-11-17 Thread Noah Misch
Account for IPC::Run::result() Windows behavior change. This restores compatibility with the not-yet-released successor of version 20220807.0. Back-patch to 9.4, which introduced this code. Reviewed by Andrew Dunstan. Discussion: https://postgr.es/m/20221117061805.ga4020...@rfd.leadboat.com Br

pgsql: Account for IPC::Run::result() Windows behavior change.

2022-11-17 Thread Noah Misch
Account for IPC::Run::result() Windows behavior change. This restores compatibility with the not-yet-released successor of version 20220807.0. Back-patch to 9.4, which introduced this code. Reviewed by Andrew Dunstan. Discussion: https://postgr.es/m/20221117061805.ga4020...@rfd.leadboat.com Br

pgsql: Account for IPC::Run::result() Windows behavior change.

2022-11-17 Thread Noah Misch
Account for IPC::Run::result() Windows behavior change. This restores compatibility with the not-yet-released successor of version 20220807.0. Back-patch to 9.4, which introduced this code. Reviewed by Andrew Dunstan. Discussion: https://postgr.es/m/20221117061805.ga4020...@rfd.leadboat.com Br

pgsql: Account for IPC::Run::result() Windows behavior change.

2022-11-17 Thread Noah Misch
Account for IPC::Run::result() Windows behavior change. This restores compatibility with the not-yet-released successor of version 20220807.0. Back-patch to 9.4, which introduced this code. Reviewed by Andrew Dunstan. Discussion: https://postgr.es/m/20221117061805.ga4020...@rfd.leadboat.com Br

pgsql: Account for IPC::Run::result() Windows behavior change.

2022-11-17 Thread Noah Misch
Account for IPC::Run::result() Windows behavior change. This restores compatibility with the not-yet-released successor of version 20220807.0. Back-patch to 9.4, which introduced this code. Reviewed by Andrew Dunstan. Discussion: https://postgr.es/m/20221117061805.ga4020...@rfd.leadboat.com Br

pgsql: Account for IPC::Run::result() Windows behavior change.

2022-11-17 Thread Noah Misch
Account for IPC::Run::result() Windows behavior change. This restores compatibility with the not-yet-released successor of version 20220807.0. Back-patch to 9.4, which introduced this code. Reviewed by Andrew Dunstan. Discussion: https://postgr.es/m/20221117061805.ga4020...@rfd.leadboat.com Br

pgsql: Account for IPC::Run::result() Windows behavior change.

2022-11-17 Thread Noah Misch
Account for IPC::Run::result() Windows behavior change. This restores compatibility with the not-yet-released successor of version 20220807.0. Back-patch to 9.4, which introduced this code. Reviewed by Andrew Dunstan. Discussion: https://postgr.es/m/20221117061805.ga4020...@rfd.leadboat.com Br

pgsql: Account for IPC::Run::result() Windows behavior change.

2022-11-17 Thread Noah Misch
Account for IPC::Run::result() Windows behavior change. This restores compatibility with the not-yet-released successor of version 20220807.0. Back-patch to 9.4, which introduced this code. Reviewed by Andrew Dunstan. Discussion: https://postgr.es/m/20221117061805.ga4020...@rfd.leadboat.com Br

pgsql: Account for IPC::Run::result() Windows behavior change.

2022-11-17 Thread Noah Misch
Account for IPC::Run::result() Windows behavior change. This restores compatibility with the not-yet-released successor of version 20220807.0. Back-patch to 9.4, which introduced this code. Reviewed by Andrew Dunstan. Discussion: https://postgr.es/m/20221117061805.ga4020...@rfd.leadboat.com Br

pgsql: Account for IPC::Run::result() Windows behavior change.

2022-11-17 Thread Noah Misch
Account for IPC::Run::result() Windows behavior change. This restores compatibility with the not-yet-released successor of version 20220807.0. Back-patch to 9.4, which introduced this code. Reviewed by Andrew Dunstan. Discussion: https://postgr.es/m/20221117061805.ga4020...@rfd.leadboat.com Br

pgsql: libpq: Handle NegotiateProtocolVersion message

2022-11-17 Thread Peter Eisentraut
libpq: Handle NegotiateProtocolVersion message Before, receiving a NegotiateProtocolVersion message would result in a confusing error message like expected authentication request from server, but received v This adds proper handling of this protocol message and produces an on-topic error mes

pgsql: libpq: Correct processing of startup response messages

2022-11-17 Thread Peter Eisentraut
libpq: Correct processing of startup response messages After sending a startup message, libpq expects either an error response ('E') or an authentication request ('R'). Before processing the message, it ensures it has read enough bytes to correspond to the length specified in the message. Howeve

pgsql: Fix wording in comment

2022-11-17 Thread Daniel Gustafsson
Fix wording in comment Author: vignesh C Discussion: https://postgr.es/m/caldanm0jky__83tusem79+yqfjtwtakdfips0t_z4y0aygd...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/3d0c95bc8920f51f7d7685c622c9a75f59cf322f Modified Files -- src/

pgsql: Fix outdated comment in ExecDelete

2022-11-17 Thread Alvaro Herrera
Fix outdated comment in ExecDelete This commend references a struct that disappeared before MERGE was merged ... and ExecDelete is not called by the committed MERGE anyway. Revert to the original wording. Backpatch to 15 Branch -- master Details --- https://git.postgresql.org/pg/commitd

pgsql: Fix outdated comment in ExecDelete

2022-11-17 Thread Alvaro Herrera
Fix outdated comment in ExecDelete This commend references a struct that disappeared before MERGE was merged ... and ExecDelete is not called by the committed MERGE anyway. Revert to the original wording. Backpatch to 15 Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/

pgsql: Allow initdb to complete on systems without "locale" command

2022-11-17 Thread Peter Eisentraut
Allow initdb to complete on systems without "locale" command This partially reverts 2fe3bdbd691a5d11626308e7d660440be6c210c8, which added an error check on the "locale -a" execution. This is removed again, adding a comment explaining why. We already had code that shows a warning if no system loc

pgsql: doc: Fix wording of MERGE actions in README

2022-11-17 Thread Daniel Gustafsson
doc: Fix wording of MERGE actions in README UPDATE was listed twice and DELETE was omitted, replace one UPDATE with DELETE instead. Backpatch through v15 where MERGE was added. Author: Myo Wai Thant Reviewed-by: Richard Guo Discussion: https://postgr.es/m/osapr01mb43247e46931e9e9cfc4aa0f29a..

pgsql: doc: Fix wording of MERGE actions in README

2022-11-17 Thread Daniel Gustafsson
doc: Fix wording of MERGE actions in README UPDATE was listed twice and DELETE was omitted, replace one UPDATE with DELETE instead. Backpatch through v15 where MERGE was added. Author: Myo Wai Thant Reviewed-by: Richard Guo Discussion: https://postgr.es/m/osapr01mb43247e46931e9e9cfc4aa0f29a..

pgsql: Fix typos in comments

2022-11-17 Thread Daniel Gustafsson
Fix typos in comments Fix various misspellings of xl_running_xacts. Author: Japin Li Discussion: https://postgr.es/m/meyp282mb1669ca2a39acf0172774ed27b6...@meyp282mb1669.ausp282.prod.outlook.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/aba2dbb3cf6283348a5f