Re: [PATCH] pgarchives: Bugfix: missing ids in pglister_sync

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Célestin Matte <celestin(dot)matte(at)cmatte(dot)me>
Cc: pgsql-www(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] pgarchives: Bugfix: missing ids in pglister_sync
Date: 2022-02-05 17:20:35
Message-ID: CABUevEwNUa5D74s74aoACm9Sn5F65BqTK+SVs8R9c8zP_Th4_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On Thu, Feb 3, 2022 at 2:52 PM Célestin Matte <celestin(dot)matte(at)cmatte(dot)me> wrote:
>
> >> I think the attached patch is more correct (I've backpatched it into
> >> the 0001 migration because making it a separate migration makes it
> >> somewhat destructive -- it's easier to just change it manually on
> >> existing installs if you have one)
> >
> > Thanks! Can it be pushed into the git repository, or does it need testing or something?

I was mainly waiting for comments on if this patch works for you, or
if others have any other ideas around it.

Have you been able to test it on your end?

> I understand that changing id fields to AutoFields can be destructive for existing install, but on the other hand, the current state of the repository is problematic as it causes pglister_sync to fail by default.
> Another solution could be to add sequences directly in postgres using RunSQL() in a migration to turn these fields into de facto serial fields. This is a bit hacky, but non-destructive. What do you think?

I'll have no problem forcing it through on the production instances we
have, I can just do that sync step manually. From the side of us
(postgresql.org infrastructure) we don't need it to be an automated
roll forward, we can just backpatch it into the 0001 migration and be
done with it. That'll make it correct for all new installs, and we'll
have to manually fix the existing ones.

Would that method work for you as well?

--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Magnus Hagander 2022-02-05 17:24:22 Re: [PATCH] pgarchives: pglister_sync: import lists with subscriber_access set to True
Previous Message Célestin Matte 2022-02-03 13:51:59 Re: [PATCH] pgarchives: Bugfix: missing ids in pglister_sync