pgsql: Add trailing commas to enum definitions

2023-10-26 Thread Peter Eisentraut
Add trailing commas to enum definitions Since C99, there can be a trailing comma after the last value in an enum definition. A lot of new code has been introducing this style on the fly. Some new patches are now taking an inconsistent approach to this. Some add the last comma on the fly if they

Re: pgsql: Prevent duplicate RTEPermissionInfo for plain-inheritance parent

2023-10-26 Thread Amit Langote
On Thu, Oct 26, 2023 at 3:08 PM David Rowley wrote: > On Thu, 26 Oct 2023 at 15:59, Amit Langote wrote: > > src/backend/optimizer/util/inherit.c | 9 ++--- > > Hi Amit, > > I'm getting an unused variable warning from this with non-assert builds: > > [697/1908] Compiling C object > src/backend/

Re: pgsql: Prevent duplicate RTEPermissionInfo for plain-inheritance parent

2023-10-26 Thread Amit Langote
On Thu, Oct 26, 2023 at 4:59 PM Amit Langote wrote: > On Thu, Oct 26, 2023 at 3:08 PM David Rowley wrote: > > On Thu, 26 Oct 2023 at 15:59, Amit Langote wrote: > > > src/backend/optimizer/util/inherit.c | 9 ++--- > > > > Hi Amit, > > > > I'm getting an unused variable warning from this with

pgsql: Avoid compiler warning in non-assert builds

2023-10-26 Thread Amit Langote
Avoid compiler warning in non-assert builds After 01575ad788e3, expand_single_inheritance_child()'s parentOID variable is read only in an Assert, provoking a compiler warning in non-assert builds. Fix that by marking the variable with PG_USED_FOR_ASSERTS_ONLY. Per report and suggestion from Davi

pgsql: Avoid compiler warning in non-assert builds

2023-10-26 Thread Amit Langote
Avoid compiler warning in non-assert builds After 01575ad788e3, expand_single_inheritance_child()'s parentOID variable is read only in an Assert, provoking a compiler warning in non-assert builds. Fix that by marking the variable with PG_USED_FOR_ASSERTS_ONLY. Per report and suggestion from Davi

pgsql: Add "Add trailing commas to enum definitions" to .git-blame-igno

2023-10-26 Thread Peter Eisentraut
Add "Add trailing commas to enum definitions" to .git-blame-ignore-revs Discussion: https://www.postgresql.org/message-id/flat/386f8c45-c8ac-4681-8add-e3b0852c1620%40eisentraut.org Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/26f988212eada9c586223cbbf876c7eb4550

pgsql: Optimize various aggregate deserialization functions, take 2

2023-10-26 Thread David Rowley
Optimize various aggregate deserialization functions, take 2 f0efa5aec added initReadOnlyStringInfo to allow a StringInfo to be initialized from an existing buffer and also relaxed the requirement that a StringInfo's buffer must be NUL terminated at data[len]. Now that we have that, there's no ne

pgsql: Remove buffers_backend and buffers_backend_fsync from pg_stat_ch

2023-10-26 Thread Michael Paquier
Remove buffers_backend and buffers_backend_fsync from pg_stat_checkpointer Two attributes related to checkpointer statistics are removed in this commit: - buffers_backend, that counts the number of buffers written directly by a backend. - buffers_backend_fsync, that counts the number of times a ba

pgsql: Make UniqueRelInfo a node

2023-10-26 Thread Alexander Korotkov
Make UniqueRelInfo a node d3d55ce571 changed RelOptInfo.unique_for_rels from the list of Relid sets to the list of UniqueRelInfo's. But it didn't make UniqueRelInfo a node. This commit makes UniqueRelInfo a node. Also this commit revises some comments related to RelOptInfo.unique_for_rels. Repo

pgsql: Use shorter file names in the upgrade logical slots test.

2023-10-26 Thread Amit Kapila
Use shorter file names in the upgrade logical slots test. The longer file names exceeded the Windows path limit on buildfarm animal fairywren. Diagnosed-by: Hou Zhijie Author: Hayato Kuroda Reviewed-by: Bharath Rupireddy Discussion: http://postgr.es/m/os0pr01mb57160df709acd02248db830c94...@os0pr