pgsql: Indent C code in flex and bison files

2022-05-12 Thread Peter Eisentraut
Indent C code in flex and bison files In the style of pgindent, done semi-manually. Discussion: https://www.postgresql.org/message-id/flat/7d062ecc-7444-23ec-a159-acd8adf9b586%40enterprisedb.com Branch -- master Details ---

pgsql: Don't report stats in LogicalRepApplyLoop() when in xact.

2022-05-12 Thread Andres Freund
Don't report stats in LogicalRepApplyLoop() when in xact. pgstat_report_stat() is only supposed to be called outside of transactions. In 5891c7a8ed8 I added a pgstat_report_stat() call into LogicalRepApplyLoop()'s timeout branch. While not commonly reached inside a transaction, it is reachable

pgsql: Remove PGDLLIMPORT marker from __pg_log_level

2022-05-12 Thread Michael Paquier
Remove PGDLLIMPORT marker from __pg_log_level Per discussion with Tom Lane and Andres Freund. I have misunderstood the intention behind the choice done in 9a374b7. Discussion: https://postgr.es/m/20220512153737.6kbbcf4qyvwgq...@alap3.anarazel.de Branch -- master Details ---

pgsql: Remove function declaration for function in pg_proc.

2022-05-12 Thread Andres Freund
Remove function declaration for function in pg_proc. The declaration is automatically generated. Noticed when experimenting with adding PGDLLIMPORT markers for functions. Discussion: https://postgr.es/m/20220512164513.vaheofqp2q24l...@alap3.anarazel.de Branch -- master Details ---

pgsql: Add missing 'extern' to function prototypes.

2022-05-12 Thread Andres Freund
Add missing 'extern' to function prototypes. Postgres style is to spell out extern. Noticed while scripting adding PGDLLIMPORT markers to functions. Discussion: https://postgr.es/m/20220512164513.vaheofqp2q24l...@alap3.anarazel.de Branch -- master Details ---

pgsql: Add missing binary_upgrade.h includes.

2022-05-12 Thread Andres Freund
Add missing binary_upgrade.h includes. A few places used binary_upgrade_* variables without including the header, which worked without warnings because the variables are defined in those places. However that can cause linker complaints with MSVC - except that we don't see them right now, due to

pgsql: Add 'static' to file-local variables missing it.

2022-05-12 Thread Andres Freund
Add 'static' to file-local variables missing it. Noticed when comparing the set of exported symbols without / with -fvisibility=hidden after adding PGDLLIMPORT to intentionally exported symbols. Discussion: https://postgr.es/m/20220512164513.vaheofqp2q24l...@alap3.anarazel.de Branch --

pgsql: Do pre-release housekeeping on catalog data.

2022-05-12 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 6205 Branch -- master Details ---

pgsql: Add 23e7b38bf to git-blame-ignore-revs.

2022-05-12 Thread Tom Lane
Add 23e7b38bf to git-blame-ignore-revs. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/03501aceae5d27bf5a23942035299d52600e3279 Modified Files -- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+)

pgsql: Pre-beta mechanical code beautification.

2022-05-12 Thread Tom Lane
Pre-beta mechanical code beautification. Run pgindent, pgperltidy, and reformat-dat-files. I manually fixed a couple of comments that pgindent uglified. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/23e7b38bfe396f919fdb66057174d29e17086418 Modified Files

pgsql: libpq: drop pending pipelined commands in pqDropConnection().

2022-05-12 Thread Tom Lane
libpq: drop pending pipelined commands in pqDropConnection(). The original coding did this in pqDropServerData(), which seems fairly backwards. Pending commands are more like already-queued output data, which is dropped in pqDropConnection(). Moving the operation means that we clear the command

pgsql: Mark a few 'bbsink' related functions / variables static.

2022-05-12 Thread Andres Freund
Mark a few 'bbsink' related functions / variables static. Discussion: https://postgr.es/m/20220506234924.6mxxotl3xl63d...@alap3.anarazel.de Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b5f44225b833a2fd07b4a7c77e33ae0c37e6a7d6 Modified Files --

pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs

2022-05-12 Thread Tom Lane
Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs. This follows in the footsteps of commit 2591ee8ec by removing one more ill-advised shortcut from planning of GroupingFuncs. It's true that we don't intend to execute the argument expression(s) at runtime, but we still have to

pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs

2022-05-12 Thread Tom Lane
Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs. This follows in the footsteps of commit 2591ee8ec by removing one more ill-advised shortcut from planning of GroupingFuncs. It's true that we don't intend to execute the argument expression(s) at runtime, but we still have to

pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs

2022-05-12 Thread Tom Lane
Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs. This follows in the footsteps of commit 2591ee8ec by removing one more ill-advised shortcut from planning of GroupingFuncs. It's true that we don't intend to execute the argument expression(s) at runtime, but we still have to

pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs

2022-05-12 Thread Tom Lane
Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs. This follows in the footsteps of commit 2591ee8ec by removing one more ill-advised shortcut from planning of GroupingFuncs. It's true that we don't intend to execute the argument expression(s) at runtime, but we still have to

pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs

2022-05-12 Thread Tom Lane
Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs. This follows in the footsteps of commit 2591ee8ec by removing one more ill-advised shortcut from planning of GroupingFuncs. It's true that we don't intend to execute the argument expression(s) at runtime, but we still have to

pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs

2022-05-12 Thread Tom Lane
Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs. This follows in the footsteps of commit 2591ee8ec by removing one more ill-advised shortcut from planning of GroupingFuncs. It's true that we don't intend to execute the argument expression(s) at runtime, but we still have to

pgsql: Tag refs/tags/REL_10_21 was created

2022-05-12 Thread noreply
Tag refs/tags/REL_10_21 was created.

pgsql: Tag refs/tags/REL_12_11 was created

2022-05-12 Thread noreply
Tag refs/tags/REL_12_11 was created.

pgsql: Tag refs/tags/REL_11_16 was created

2022-05-12 Thread noreply
Tag refs/tags/REL_11_16 was created.

pgsql: Last-minute updates for release notes.

2022-05-12 Thread Tom Lane
Last-minute updates for release notes. Security: CVE-2022-1552 Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/db034c2e2e45216439c14e2b7bb99260914d610f Modified Files -- doc/src/sgml/release-10.sgml | 81

pgsql: Tag refs/tags/REL_14_3 was created

2022-05-12 Thread noreply
Tag refs/tags/REL_14_3 was created.

pgsql: Tag refs/tags/REL_13_7 was created

2022-05-12 Thread noreply
Tag refs/tags/REL_13_7 was created.

pgsql: Last-minute updates for release notes.

2022-05-12 Thread Tom Lane
Last-minute updates for release notes. Security: CVE-2022-1552 Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0ae1d09575bbadd2e7a9ada5721a88c8ee0b6be3 Modified Files -- doc/src/sgml/release-14.sgml | 83

pgsql: Last-minute updates for release notes.

2022-05-12 Thread Tom Lane
Last-minute updates for release notes. Security: CVE-2022-1552 Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0c8215c7b6bdf528edab88943438f0db9afad49b Modified Files -- doc/src/sgml/release-13.sgml | 83

pgsql: Last-minute updates for release notes.

2022-05-12 Thread Tom Lane
Last-minute updates for release notes. Security: CVE-2022-1552 Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/b4516b1aea7ac98bc21b47a66ad384f50c2bd2b7 Modified Files -- doc/src/sgml/release-12.sgml | 81

pgsql: Last-minute updates for release notes.

2022-05-12 Thread Tom Lane
Last-minute updates for release notes. Security: CVE-2022-1552 Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/b5576e1b701c8d690ed1ea8d3c17d5df49de3d7c Modified Files -- doc/src/sgml/release-11.sgml | 81

pgsql: Make relation-enumerating operations be security-restricted oper

2022-05-12 Thread Noah Misch
Make relation-enumerating operations be security-restricted operations. When a feature enumerates relations and runs functions associated with all found relations, the feature's user shall not need to trust every user having permission to create objects. BRIN-specific functionality in autovacuum

pgsql: In REFRESH MATERIALIZED VIEW, set user ID before running user co

2022-05-12 Thread Noah Misch
In REFRESH MATERIALIZED VIEW, set user ID before running user code. It intended to, but did not, achieve this. Adopt the new standard of setting user ID just after locking the relation. Back-patch to v10 (all supported versions). Reviewed by Simon Riggs. Reported by Alvaro Herrera. Security:

pgsql: In REFRESH MATERIALIZED VIEW, set user ID before running user co

2022-05-12 Thread Noah Misch
In REFRESH MATERIALIZED VIEW, set user ID before running user code. It intended to, but did not, achieve this. Adopt the new standard of setting user ID just after locking the relation. Back-patch to v10 (all supported versions). Reviewed by Simon Riggs. Reported by Alvaro Herrera. Security:

pgsql: In REFRESH MATERIALIZED VIEW, set user ID before running user co

2022-05-12 Thread Noah Misch
In REFRESH MATERIALIZED VIEW, set user ID before running user code. It intended to, but did not, achieve this. Adopt the new standard of setting user ID just after locking the relation. Back-patch to v10 (all supported versions). Reviewed by Simon Riggs. Reported by Alvaro Herrera. Security:

pgsql: Make relation-enumerating operations be security-restricted oper

2022-05-12 Thread Noah Misch
Make relation-enumerating operations be security-restricted operations. When a feature enumerates relations and runs functions associated with all found relations, the feature's user shall not need to trust every user having permission to create objects. BRIN-specific functionality in autovacuum

pgsql: Make relation-enumerating operations be security-restricted oper

2022-05-12 Thread Noah Misch
Make relation-enumerating operations be security-restricted operations. When a feature enumerates relations and runs functions associated with all found relations, the feature's user shall not need to trust every user having permission to create objects. BRIN-specific functionality in autovacuum

pgsql: Make relation-enumerating operations be security-restricted oper

2022-05-12 Thread Noah Misch
Make relation-enumerating operations be security-restricted operations. When a feature enumerates relations and runs functions associated with all found relations, the feature's user shall not need to trust every user having permission to create objects. BRIN-specific functionality in autovacuum

pgsql: In REFRESH MATERIALIZED VIEW, set user ID before running user co

2022-05-12 Thread Noah Misch
In REFRESH MATERIALIZED VIEW, set user ID before running user code. It intended to, but did not, achieve this. Adopt the new standard of setting user ID just after locking the relation. Back-patch to v10 (all supported versions). Reviewed by Simon Riggs. Reported by Alvaro Herrera. Security:

pgsql: Make relation-enumerating operations be security-restricted oper

2022-05-12 Thread Noah Misch
Make relation-enumerating operations be security-restricted operations. When a feature enumerates relations and runs functions associated with all found relations, the feature's user shall not need to trust every user having permission to create objects. BRIN-specific functionality in autovacuum

pgsql: Make relation-enumerating operations be security-restricted oper

2022-05-12 Thread Noah Misch
Make relation-enumerating operations be security-restricted operations. When a feature enumerates relations and runs functions associated with all found relations, the feature's user shall not need to trust every user having permission to create objects. BRIN-specific functionality in autovacuum

pgsql: In REFRESH MATERIALIZED VIEW, set user ID before running user co

2022-05-12 Thread Noah Misch
In REFRESH MATERIALIZED VIEW, set user ID before running user code. It intended to, but did not, achieve this. Adopt the new standard of setting user ID just after locking the relation. Back-patch to v10 (all supported versions). Reviewed by Simon Riggs. Reported by Alvaro Herrera. Security:

pgsql: In REFRESH MATERIALIZED VIEW, set user ID before running user co

2022-05-12 Thread Noah Misch
In REFRESH MATERIALIZED VIEW, set user ID before running user code. It intended to, but did not, achieve this. Adopt the new standard of setting user ID just after locking the relation. Back-patch to v10 (all supported versions). Reviewed by Simon Riggs. Reported by Alvaro Herrera. Security:

pgsql: relnotes: adjust several logical replication items and FK text

2022-05-12 Thread Bruce Momjian
relnotes: adjust several logical replication items and FK text Reported-by: Amit Langote, Amit Kapila, Takamichi Osumi Discussion: https://postgr.es/m/CAA4eK1KdAho_fNkYRe=o=xpxws_tg4o0v8cjbavtg8hamwt...@mail.gmail.com Branch -- master Details ---

pgsql: postgres_fdw: Update comments in make_new_connection().

2022-05-12 Thread Etsuro Fujita
postgres_fdw: Update comments in make_new_connection(). Expand the comment about the parallel_commit option to mention that the default is false. Also, since the comment about alteration of the keep_connections option, which was located above the expanded comment, holds true for the

pgsql: Add some missing PGDLLIMPORT markings

2022-05-12 Thread Michael Paquier
Add some missing PGDLLIMPORT markings Three variables in pqsignal.h (UnBlockSig, BlockSig and StartupBlockSig) were not marked with PGDLLIMPORT, as they are declared in a way that prevents mark_pgdllimport.pl to detect them. These variables are redefined in a style more consistent with the other