Re: Command order bug in pg_dump

From: Alvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kirill Reshke <reshkekirill(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Command order bug in pg_dump
Date: 2025-04-22 19:08:07
Message-ID: 202504221908.4py5zqgmm422@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2025-Apr-21, Tom Lane wrote:

> I experimented with the attached, which approximates "add some digits
> to the name used for the parent constraint". (We could refactor
> ChooseConstraintName if we wanted a less approximate version of that
> rule, but I'm not sure it's worth the trouble.)

This seems a better implementation of the idea than what I had in mind.
For my part, please feel free to go ahead with this. (I can focus on
the remaining problems with self-referencing FKs ... sigh)

> The extent to which these derived names leak out to the user, as
> illustrated by the regression test changes, makes me even less happy
> about the fact that \d doesn't show them. I think we really ought
> to try to find a way to not need these entries. But that is clearly
> not v18 material at this point.

Well, for starters we could change psql to show the hidden constraint
names. Since this appears to be a problem for users, maybe even change
\d+ to show them in backbranches. For the longer term (19) I can try to
work on reimplementing things so that these names don't appear anywhere
and are more collision-resistant (though frankly I would prefer to spend
my time on REPACK and column reordering)

> > I'd probably not change this in versions 13 and 14 at all in any case,
> > because the code is too different. I'm unsure whether this is enough of
> > a bug to consider backpatching to 15-17; maybe we should just change 18
> > at this point, since I haven't heard of a user complaining about this.
>
> Kirill's complaint isn't that?

I didn't see it as one as first, but I reread his OP and now I agree
that it is.

FWIW I've been migrating my main email address to a new domain. Finally
got sick of noip.com.

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"La vida es para el que se aventura"

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-04-22 19:14:19 Re: Command order bug in pg_dump
Previous Message Masahiko Sawada 2025-04-22 18:10:23 Re: Disabled logical replication origin session causes primary key errors