Re: pgsql: postgres_fdw: Fix assertion in estimate_path_cost_size().

2022-12-12 Thread Robins Tharakan
Hi, I think this bugfix needs to be backpatched to v12 too. See backtrace / repro SQL here - https://www.postgresql.org/message-id/17713-92cce66de7e81c04%40postgresql.org - Robins Tharakan Amazon Web Services On Fri, 5 Feb 2021 at 17:05, Etsuro Fujita wrote: > > postgres_fdw: Fix assertion in

pgsql: Get rid of recursion-marker values in enum AlterTableType

2022-12-12 Thread Alvaro Herrera
Get rid of recursion-marker values in enum AlterTableType During ALTER TABLE execution, when prep-time handling of subcommands of certain types determine that execution-time handling requires recursion, they signal this by changing the subcommand type to a special value. This can be done in a simp

pgsql: Order getopt arguments

2022-12-12 Thread Peter Eisentraut
Order getopt arguments Order the letters in the arguments of getopt() and getopt_long(), as well as in the subsequent switch statements. In most cases, I used alphabetical with lower case first. In a few cases, existing different orders (e.g., upper case first) was kept to reduce the diff size.

pgsql: Fix failure to advance content pointer in sendFileWithContent.

2022-12-12 Thread Robert Haas
Fix failure to advance content pointer in sendFileWithContent. If sendFileWithContent were used to send a file larger than the bbsink buffer size, this would result in corruption. The only files that are sent via sendFileWithContent are the backup label file, the tablespace map file, and .done fil

pgsql: Fix failure to advance content pointer in sendFileWithContent.

2022-12-12 Thread Robert Haas
Fix failure to advance content pointer in sendFileWithContent. If sendFileWithContent were used to send a file larger than the bbsink buffer size, this would result in corruption. The only files that are sent via sendFileWithContent are the backup label file, the tablespace map file, and .done fil

pgsql: Remove extra space from dumped ALTER DEFAULT PRIVILEGES.

2022-12-12 Thread Jeff Davis
Remove extra space from dumped ALTER DEFAULT PRIVILEGES. Author: Nathan Bossart Discussion: https://postgr.es/m/20221206232744.GA3560301@nathanxps13 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2af33369e7940770cb81c0a9b7d3ec874ee8cb22 Modified Files

pgsql: Better document logical replication parameters

2022-12-12 Thread Alvaro Herrera
Better document logical replication parameters Add some cross-links between chapter "20. Server Parameters" and "31. Logical Replication" regarding the available configuration parameters, for easier navigation; and some more explanatory text too. I (Álvaro) chose to duplicate max_replication_slot

pgsql: Disable clang 16's -Wcast-function-type-strict.

2022-12-12 Thread Thomas Munro
Disable clang 16's -Wcast-function-type-strict. Clang 16 is still in development, but seawasp reveals that it has started warning about many of our casts of function pointers (those introduced by commit 1c27d16e, and some older ones). Disable the new warning for now, since otherwise buildfarm ani

pgsql: Fix jsonb subscripting to cope with toasted subscript values.

2022-12-12 Thread Tom Lane
Fix jsonb subscripting to cope with toasted subscript values. jsonb_get_element() was incautious enough to use VARDATA() and VARSIZE() directly on an arbitrary text Datum. That of course fails if the Datum is short-header, compressed, or out-of-line. The typical result would be failing to match a

pgsql: Fix jsonb subscripting to cope with toasted subscript values.

2022-12-12 Thread Tom Lane
Fix jsonb subscripting to cope with toasted subscript values. jsonb_get_element() was incautious enough to use VARDATA() and VARSIZE() directly on an arbitrary text Datum. That of course fails if the Datum is short-header, compressed, or out-of-line. The typical result would be failing to match a

pgsql: Fix jsonb subscripting to cope with toasted subscript values.

2022-12-12 Thread Tom Lane
Fix jsonb subscripting to cope with toasted subscript values. jsonb_get_element() was incautious enough to use VARDATA() and VARSIZE() directly on an arbitrary text Datum. That of course fails if the Datum is short-header, compressed, or out-of-line. The typical result would be failing to match a

pgsql: Refactor ExecGrant_*() functions

2022-12-12 Thread Peter Eisentraut
Refactor ExecGrant_*() functions Instead of half a dozen of mostly-duplicate ExecGrant_Foo() functions, write one common function ExecGrant_generic() that can handle most of them. We already have all the information we need, such as which system catalog corresponds to which catalog table and whic