psql \d+ shows "Replica Identity: ???" for REPLICA IDENTITY NOTHING

From: Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: psql \d+ shows "Replica Identity: ???" for REPLICA IDENTITY NOTHING
Date: 2026-08-16 05:18:44
Message-ID: CAOzEurRHWt+9XLBrbXQOSVkE45NksJ4F28twuqgZ7veW0RzpUQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

I found that \d+ shows "Replica Identity: ???" for a table with
REPLICA IDENTITY NOTHING:

```
CREATE TABLE t (a int);
ALTER TABLE t REPLICA IDENTITY NOTHING;
\d+ t
Table "public.t"
Column | Type | Collation | Nullable | Default | Storage |
Compression | Stats target | Description
--------+---------+-----------+----------+---------+---------+-------------+--------------+-------------
a | integer | | | | plain |
| |
Replica Identity: ???
Access method: heap
```

Commit 18954ce7f69 replaced the hard-coded relreplident characters in
describe.c with REPLICA_IDENTITY_* macros, but wrote
REPLICA_IDENTITY_DEFAULT where REPLICA_IDENTITY_NOTHING was intended,
so the NOTHING case falls through to "???". This is a regression in
v18.

The attached patch fixes the comparison and adds regression test
coverage, which only existed for FULL. I think this should be
back-patched to v18.

Thoughts?

--
Shinya Kato
NTT OSS Center

Attachment Content-Type Size
v1-0001-psql-Fix-d-display-of-REPLICA-IDENTITY-NOTHING.patch application/octet-stream 4.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2026-08-16 05:35:00 Re: Introduce XID age based replication slot invalidation
Previous Message sahil verma 2026-08-16 05:06:13 Request to expedite CommitFest account cool-off period