pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: mohen.lhy@alibaba-inc.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19100: Different column type between partitioned table and detached pending partition table make errors
Date: Sun, 02 Nov 2025 13:36:12 -0500
Message-ID: <442267.1762108572@sss.pgh.pa.us> (raw)
In-Reply-To: <19100-f676a0f5c4723b2f@postgresql.org>
References: <19100-f676a0f5c4723b2f@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> It's evident that in both error cases, the failure occurs because
> column name has different data types between the parent and the child
> table. BTW, "\d+ users_p0" error happens when
> pg_get_partition_constraintdef() is called. The root cause seems to be
> that when running:
> ```
> ALTER TABLE users ALTER COLUMN name TYPE char(10);
> ```
> on the parent table, the statement does not affect a child table that is in
> detach pending state.

Ugh.

> IMO, a detach pending child table is not affected by parent's DML or DQL,
> but should still be affected by parent's DDL.

I think it'd be far safer to refuse all forms of ALTER TABLE until the
detach is completed.

			regards, tom lane





view thread (4+ messages)  latest in thread

Message-ID: <442267.1762108572@sss.pgh.pa.us>
Permalink:  ../442267.1762108572@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/442267.1762108572@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mohen.lhy@alibaba-inc.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #19100: Different column type between partitioned table and detached pending partition table make errors
  In-Reply-To: <442267.1762108572@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox