Re: BUG #19952: psql \d+ omits nondefault replica identity for partitioned tables

From: Pavan <prampalli30(at)gmail(dot)com>
To: Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>
Cc: imchifan(at)mail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19952: psql \d+ omits nondefault replica identity for partitioned tables
Date: 2026-11-29 15:02:17
Message-ID: CAEyqiQEcdtHqK1eHa6KRAAErjVY7U7iE=cbN+2E2KXsEN3J5mw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Srinath,

I reviewed and tested v1 against master (9ebc9a4) with
--enable-cassert --enable-debug.

- Patch applies cleanly and compiles with no warnings.
- Full `make check` passes (including `replica_identity` and `psql`).
- Verified that AT_ReplicaIdentity in tablecmds.c allows only
ATT_TABLE | ATT_PARTITIONED_TABLE | ATT_MATVIEW, so adding
RELKIND_PARTITIONED_TABLE in describe.c matches the backend 1-to-1.
- Manually tested \d+ on partitioned tables with 0 partitions and
with child partitions (including a sub-partitioned child) across
all four modes:
* REPLICA IDENTITY FULL -> displays "Replica Identity: FULL"
* REPLICA IDENTITY NOTHING -> displays "Replica Identity: NOTHING"
* REPLICA IDENTITY USING INDEX -> shows the REPLICA IDENTITY marker
on the index without a duplicate footer
* REPLICA IDENTITY DEFAULT -> omits the footer as expected
* Child partitions remain unaffected when altering the parent.
- Checked psql-ref.sgml; it already describes \d+ as showing
non-default replica identity generally, so no doc update is needed.

One minor optional suggestion: it might be nice to also include a
quick check for REPLICA IDENTITY NOTHING (and resetting to DEFAULT)
in replica_identity.sql, though the code path is straightforward.
Overall the patch looks clean and good to me.

Regards,
Pavan

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexander Lakhin 2026-11-29 16:00:00 Re: BUG #19928: pg_upgrade fails on v18 schema with NOT NULL ... NO INHERIT and inheritance
Previous Message PG Bug reporting form 2026-11-29 14:54:32 BUG #19957: jsonpath `last` returns the wrong index after a filter containing `exists($x[0])`