Re: [PATCH] pgarchives: Bugfix: missing ids in pglister_sync - Mailing list pgsql-www

From Magnus Hagander
Subject Re: [PATCH] pgarchives: Bugfix: missing ids in pglister_sync
Date
Msg-id CABUevEwNUa5D74s74aoACm9Sn5F65BqTK+SVs8R9c8zP_Th4_A@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] pgarchives: Bugfix: missing ids in pglister_sync  (Célestin Matte <celestin.matte@cmatte.me>)
Responses Re: [PATCH] pgarchives: Bugfix: missing ids in pglister_sync  (Célestin Matte <celestin.matte@cmatte.me>)
List pgsql-www
On Thu, Feb 3, 2022 at 2:52 PM Célestin Matte <celestin.matte@cmatte.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,
thecurrent 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
intode 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/



pgsql-www by date:

Previous
From: Célestin Matte
Date:
Subject: Re: [PATCH] pgarchives: Bugfix: missing ids in pglister_sync
Next
From: Magnus Hagander
Date:
Subject: Re: [PATCH] pgarchives: pglister_sync: import lists with subscriber_access set to True