Re: How to attach partition with primary key

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Philipp Faster <phfaster(at)gmail(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: How to attach partition with primary key
Date: 2024-06-18 09:46:27
Message-ID: 202406180946.d2f3oktuoyps@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2024-Jun-18, Philipp Faster wrote:

> As I understand, PostgreSQL refuses to use existing primary key for
> some reason and tries to create its own as a children of
> "Transactions" table's primary key.

Yeah. Your case sounds like the primary key in the partitioned table
has some slight definition difference from the stock one, which makes
the one you create in the partition not an exact match. I'd suggest to
look at what "pg_dump -s" emits as definition of the table with a
magnifying glass to search for such differences.

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2024-06-18 13:02:56 Re: DROP COLLATION vs pg_collation question
Previous Message Shaheed Haque 2024-06-18 09:03:19 Re: Monitoring logical replication