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

2023-10-25 Thread David Rowley
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/postgres_lib.a.p/optimizer_util_inherit.c.o ../src/backend/optimizer

pgsql: Introduce the concept of read-only StringInfos

2023-10-25 Thread David Rowley
Introduce the concept of read-only StringInfos There were various places in our codebase which conjured up a StringInfo by manually assigning the StringInfo fields and setting the data field to point to some existing buffer. There wasn't much consistency here as to what fields like maxlen got set

pgsql: Prevent duplicate RTEPermissionInfo for plain-inheritance parent

2023-10-25 Thread Amit Langote
Prevent duplicate RTEPermissionInfo for plain-inheritance parents Currently, expand_single_inheritance_child() doesn't reset perminfoindex in a plain-inheritance parent's child RTE, because prior to 387f9ed0a0, the executor would use the first child RTE to locate the parent's RTEPermissionInfo. T

pgsql: Prevent duplicate RTEPermissionInfo for plain-inheritance parent

2023-10-25 Thread Amit Langote
Prevent duplicate RTEPermissionInfo for plain-inheritance parents Currently, expand_single_inheritance_child() doesn't reset perminfoindex in a plain-inheritance parent's child RTE, because prior to 387f9ed0a0, the executor would use the first child RTE to locate the parent's RTEPermissionInfo. T

pgsql: Migrate logical slots to the new node during an upgrade.

2023-10-25 Thread Amit Kapila
Migrate logical slots to the new node during an upgrade. While reading information from the old cluster, a list of logical slots is fetched. At the later part of upgrading, pg_upgrade revisits the list and restores slots by executing pg_create_logical_replication_slot() on the new cluster. Migrati

pgsql: Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFA

2023-10-25 Thread Tom Lane
Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFAULT. As far as I can see, ecpg has no notion of a "default" open connection. You can do "CONNECT TO DEFAULT" but that just specifies letting libpq use all its default connection parameters --- the resulting connection is not special

pgsql: Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFA

2023-10-25 Thread Tom Lane
Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFAULT. As far as I can see, ecpg has no notion of a "default" open connection. You can do "CONNECT TO DEFAULT" but that just specifies letting libpq use all its default connection parameters --- the resulting connection is not special

pgsql: Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFA

2023-10-25 Thread Tom Lane
Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFAULT. As far as I can see, ecpg has no notion of a "default" open connection. You can do "CONNECT TO DEFAULT" but that just specifies letting libpq use all its default connection parameters --- the resulting connection is not special

pgsql: Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFA

2023-10-25 Thread Tom Lane
Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFAULT. As far as I can see, ecpg has no notion of a "default" open connection. You can do "CONNECT TO DEFAULT" but that just specifies letting libpq use all its default connection parameters --- the resulting connection is not special

pgsql: Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFA

2023-10-25 Thread Tom Lane
Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFAULT. As far as I can see, ecpg has no notion of a "default" open connection. You can do "CONNECT TO DEFAULT" but that just specifies letting libpq use all its default connection parameters --- the resulting connection is not special

pgsql: Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFA

2023-10-25 Thread Tom Lane
Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFAULT. As far as I can see, ecpg has no notion of a "default" open connection. You can do "CONNECT TO DEFAULT" but that just specifies letting libpq use all its default connection parameters --- the resulting connection is not special

pgsql: Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFA

2023-10-25 Thread Tom Lane
Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFAULT. As far as I can see, ecpg has no notion of a "default" open connection. You can do "CONNECT TO DEFAULT" but that just specifies letting libpq use all its default connection parameters --- the resulting connection is not special

pgsql: Remove dead code in pg_ctl.c.

2023-10-25 Thread Nathan Bossart
Remove dead code in pg_ctl.c. Missed in 39969e2a1e. Author: David Steele Discussion: https://postgr.es/m/0c742f0c-d663-419d-b5a7-4fe867f5566c%40pgmasters.net Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/fdeb6e6a74f26e7b4504d358ffc751a6d74c08ab Modified Files -

pgsql: Doc fix: Interfacing Extensions to Indexes

2023-10-25 Thread Jeff Davis
Doc fix: Interfacing Extensions to Indexes Refer to CREATE ACCESS METHOD rather than suggesting direct changes to pg_am. Also corrects index-specific language that predated table access methods. Discussion: https://postgr.es/m/20231025172551.685b7799455f9a6addcf5...@sraoss.co.jp Reported-by: Yug

Re: pgsql: Remove useless self-joins

2023-10-25 Thread Alexander Korotkov
On Wed, Oct 25, 2023 at 1:31 PM David Rowley wrote: > > On Wed, 25 Oct 2023 at 22:59, Alexander Korotkov > wrote: > > src/test/regress/sql/join.sql | 359 > > There seems to be a few EXPLAINs added here that didn't include costs off. Thank you for catching this. Fixed.

pgsql: Fix some regression tests for d3d55ce57136

2023-10-25 Thread Alexander Korotkov
Fix some regression tests for d3d55ce57136 Add missing (cost off) to explain. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9ba9c7074fa76787530ac0d50313e317ac7032b9 Modified Files -- src/test/regress/expected/join.out | 33 ++--

Re: pgsql: Remove useless self-joins

2023-10-25 Thread David Rowley
On Wed, 25 Oct 2023 at 22:59, Alexander Korotkov wrote: > src/test/regress/sql/join.sql | 359 There seems to be a few EXPLAINs added here that didn't include costs off. David

pgsql: Remove useless self-joins

2023-10-25 Thread Alexander Korotkov
Remove useless self-joins The Self Join Elimination (SJE) feature removes an inner join of a plain table to itself in the query tree if is proved that the join can be replaced with a scan without impacting the query result. Self join and inner relation are replaced with the outer in query, equiva

pgsql: doc: Fix link to catalog table

2023-10-25 Thread Daniel Gustafsson
doc: Fix link to catalog table The link to pg_type was accidentally linking to pg_authid instead. Backpatch to 12 and 11. Author: Maxim Yablokov Discussion: https://postgr.es/m/3289f0ff-0925-46c9-b126-7e4ab6831...@postgrespro.ru Backpatch-through: 11, 12 Branch -- REL_11_STABLE Details --

pgsql: doc: Fix link to catalog table

2023-10-25 Thread Daniel Gustafsson
doc: Fix link to catalog table The link to pg_type was accidentally linking to pg_authid instead. Backpatch to 12 and 11. Author: Maxim Yablokov Discussion: https://postgr.es/m/3289f0ff-0925-46c9-b126-7e4ab6831...@postgrespro.ru Backpatch-through: 11, 12 Branch -- REL_12_STABLE Details --

pgsql: Use snprintf instead of sprintf in pg_regress.

2023-10-25 Thread Daniel Gustafsson
Use snprintf instead of sprintf in pg_regress. To avoid static analyzers sounding the alarm, move to using snprintf instead of sprintf. This was an oversight in 66d6086cbcbfc8dee789a6. Reported-by: Tom Lane Discussion: https://postgr.es/m/849588.1698179...@sss.pgh.pa.us Branch -- master De