pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Aleksander Alekseev <aleksander@timescale.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Amul Sul <sulamul@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>
Subject: Re: Dump-restore loosing 'attnotnull' bit for DEFERRABLE PRIMARY KEY column(s).
Date: Tue, 14 May 2024 16:42:04 +0200
Message-ID: <202405141442.lk6qchbdesxo@alvherre.pgsql> (raw)
In-Reply-To: <CA+TgmoYu8qR61teGWz5Yq0hhcebnu1zPF0qHaOAVCu4dV+KGDA@mail.gmail.com>

On 2024-May-14, Robert Haas wrote:

> On Thu, Mar 7, 2024 at 12:32 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> > On 2024-Mar-07, Alvaro Herrera wrote:
> > > Maybe we can add a flag RelationData->rd_ispkdeferred, so that
> > > RelationGetPrimaryKeyIndex returned InvalidOid for deferrable PKs; then
> > > logical replication would continue to not know about this PK, which
> > > perhaps is what we want.  I'll do some testing with this.
> >
> > This seems to work okay.
> 
> There is a CommitFest entry for this patch. Should that entry be
> closed in view of the not-NULL revert
> (6f8bb7c1e9610dd7af20cdaf74c4ff6e6d678d44)?

Uhmm, I didn't realize there was a CF entry.  I don't know why it was
there; this should have been an open item, not a bugfix CF entry.

This had already been committed as 270af6f0df76 (the day before it was
sent to the next commitfest).  This commit wasn't included in the
reverted set, though, so you still get deferrable PKs from
RelationGetIndexList.  I don't think this is necessarily a bad thing,
though these don't have any usefulness as things stand (and if we deal
with PKs by forcing not-null constraints to be underneath, then we won't
need them either).

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"Postgres is bloatware by design: it was built to house
 PhD theses." (Joey Hellerstein, SIGMOD annual conference 2002)





view thread (21+ messages)  latest in thread

Message-ID: <202405141442.lk6qchbdesxo@alvherre.pgsql>
Permalink:  ../202405141442.lk6qchbdesxo@alvherre.pgsql/
Also on:    postgresql.org/message-id/202405141442.lk6qchbdesxo@alvherre.pgsql

 · 

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-hackers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, robertmhaas@gmail.com, dean.a.rasheed@gmail.com, aleksander@timescale.com, sulamul@gmail.com, vignesh21@gmail.com
  Subject: Re: Dump-restore loosing 'attnotnull' bit for DEFERRABLE PRIMARY KEY column(s).
  In-Reply-To: <202405141442.lk6qchbdesxo@alvherre.pgsql>

* 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