Re: psql: Don't offer partitioned tables after CREATE INDEX CONCURRENTLY

From: Sho Ito <i(dot)sho(dot)0628(at)gmail(dot)com>
To: Ishjaap Singh <ishjaap(dot)singh07(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: psql: Don't offer partitioned tables after CREATE INDEX CONCURRENTLY
Date: 2026-11-08 17:15:03
Message-ID: CAG7L5+6tBBrsG_69uPAYuzfWBudmd3hFwuUYqZX8w2=YfwuR2Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Ishjaap,

I reviewed v1 on master with assertions enabled. All psql TAP tests pass.

Additional checks confirm that materialized views and leaf partitions remain
offered, including with schema-qualified names, and that plain `CREATE
INDEX`
still offers partitioned tables.

The new completion list aligns with the backend behaviour: leaf partitions
support `CREATE INDEX CONCURRENTLY`, while `DefineIndex()` rejects it for
partitioned parents [1].

As you noted, if the backend patch allowing `CREATE INDEX CONCURRENTLY` on
partitioned tables is committed, this completion filter will need
revisiting.

I found no issues with the patch. Looks good to me.

[1]
https://github.com/postgres/postgres/blob/0607aa61090ac1b574f8bafe854c684195b31e16/src/backend/commands/indexcmds.c#L740-L753

Thanks,
Sho

--
=======================================
*Sho Ito (Sean)*

E-mail: i(dot)sho(dot)0628(at)gmail(dot)com
LinkedIn: *https://www.linkedin.com/in/sho-ito-0628/
<https://www.linkedin.com/in/sho-ito-0628/>*
GitHub: https://github.com/sean0628/
=======================================

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2026-11-08 17:23:50 Re: libpq: Don't read past the end of a message when tracing it
Previous Message Álvaro Herrera 2026-11-08 16:28:06 Re: First draft of PG 19 release notes