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-01-30 12:32:29
Message-ID: CABUevEyo3T2QY9sEFvthmNd2vYRzUnESWZ=i9GaotQsyhuEQww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On Fri, Jan 28, 2022 at 6:52 PM Célestin Matte <celestin(dot)matte(at)cmatte(dot)me> wrote:
>
> groupid and listid are not explicitly set in pglister_sync's queries, which
> causes the script to fail as these fields are NOT NULL and postgresql default
> configuration does not auto-fill id fields.
>
> This patch sets them explicitly by reusing the ones obtained from pglister.

These fields are supposed to be serial fields, not pure integers, I
think. This feels like some very old legacy that hasn't been properly
fixed.

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)

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

Attachment Content-Type Size
autofields.patch text/x-patch 2.1 KB

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Célestin Matte 2022-02-02 08:16:20 Re: [PATCH] pgarchives: pglister_sync: import lists with subscriber_access set to True
Previous Message Magnus Hagander 2022-01-30 12:20:30 Re: [PATCH] pgarchives: pglister_sync: import lists with subscriber_access set to True