public inbox for [email protected]  
help / color / mirror / Atom feed
Re: Two sequences associated with one identity column
3+ messages / 3 participants
[nested] [flat]

* Re: Two sequences associated with one identity column
@ 2025-10-29 13:16 kurt thepw.com <[email protected]>
  2025-10-29 13:29 ` Re: Two sequences associated with one identity column Dominique Devienne <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: kurt thepw.com @ 2025-10-29 13:16 UTC (permalink / raw)
  To: Colin 't Hart <[email protected]>; PostgreSQL General <[email protected]>


     If this is a development database, perhaps you can do a schema-only pg_dump of it in plain text format, manually edit out the offending second sequence from  the resulting SQL file, and restore it into a new database.

Yours,

Kurt Reimer
________________________________
From: Colin 't Hart <[email protected]>
Sent: Wednesday, October 29, 2025 8:20 AM
To: PostgreSQL General <[email protected]>
Subject: Re: Two sequences associated with one identity column

Again as I wrote above, drop identity complains about more than one sequence.

I have no idea how this customer arrived at this situation or if it
affects other environments (this is actually a dev database that we're
trying to upgrade as the first step in an upgrade project).

I suspect the dump will just show two sequences that need to be
imported and it will fail on the second one. I'll make a dump.

/Colin

On Wed, 29 Oct 2025 at 13:07, hubert depesz lubaczewski
<[email protected]> wrote:
>
> On Wed, Oct 29, 2025 at 01:04:48PM +0100, Colin 't Hart wrote:
> > Thanks. But as I wrote above, trying to alter either of the two
> > sequences and specifying "owned by none" results in the error.
>
> Sorry, missed that.
>
> Can you please provide pg_dump output from this db, just schema, just
> this one table, and both sequences?
>
> Or, how did you arrive at this situation?
>
> Did you try to alter table … alter column … drop identity;
>
> Best regards,
>
> depesz
>




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Two sequences associated with one identity column
  2025-10-29 13:16 Re: Two sequences associated with one identity column kurt thepw.com <[email protected]>
@ 2025-10-29 13:29 ` Dominique Devienne <[email protected]>
  2025-10-29 13:39   ` Re: Two sequences associated with one identity column David G. Johnston <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Dominique Devienne @ 2025-10-29 13:29 UTC (permalink / raw)
  To: kurt thepw.com <[email protected]>; +Cc: Colin 't Hart <[email protected]>; PostgreSQL General <[email protected]>

On Wed, Oct 29, 2025 at 2:17 PM kurt thepw.com <[email protected]> wrote:
>    If this is a development database, perhaps you can do a schema-only pg_dump of it in plain text format, manually edit out the offending second sequence from  the resulting SQL file, and restore it into a new database.

I'm surprised the conversation is not more about preventing this from
ever happening in the first place. Since one cannot get out of it,
apparently. --DD






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Two sequences associated with one identity column
  2025-10-29 13:16 Re: Two sequences associated with one identity column kurt thepw.com <[email protected]>
  2025-10-29 13:29 ` Re: Two sequences associated with one identity column Dominique Devienne <[email protected]>
@ 2025-10-29 13:39   ` David G. Johnston <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: David G. Johnston @ 2025-10-29 13:39 UTC (permalink / raw)
  To: Dominique Devienne <[email protected]>; +Cc: kurt thepw.com <[email protected]>; Colin 't Hart <[email protected]>; PostgreSQL General <[email protected]>

On Wednesday, October 29, 2025, Dominique Devienne <[email protected]>
wrote:

> On Wed, Oct 29, 2025 at 2:17 PM kurt thepw.com <[email protected]> wrote:
> >    If this is a development database, perhaps you can do a schema-only
> pg_dump of it in plain text format, manually edit out the offending second
> sequence from  the resulting SQL file, and restore it into a new database.
>
> I'm surprised the conversation is not more about preventing this from
> ever happening in the first place. Since one cannot get out of it,
> apparently. --DD
>
>
If a reproducer is not offered discussions do tend to focus on fixing the
symptoms since that is what is available to consider.  Not too surprised no
one volunteers to reverse-engineer a reproducer from scratch, given only
the end state.

David J.


^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2025-10-29 13:39 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-10-29 13:16 Re: Two sequences associated with one identity column kurt thepw.com <[email protected]>
2025-10-29 13:29 ` Dominique Devienne <[email protected]>
2025-10-29 13:39   ` David G. Johnston <[email protected]>

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