Re: Restore replication settings when modifying a field type

From: Euler Taveira <euler(dot)taveira(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Quan Zongliang <quanzongliang(at)foxmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Restore replication settings when modifying a field type
Date: 2020-03-10 13:16:22
Message-ID: CAH503wBz6re8o+JCRUNnobJ4kCCXR4-D0OnwRw2Z0m_=nh_g1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 5 Mar 2020 at 09:45, Peter Eisentraut <
peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:

> On 2020-02-11 00:38, Quan Zongliang wrote:
> > new patch attached.
>
> I didn't like so much how the updating of the replica identity was
> hacked into the middle of ATRewriteCatalogs(). I have an alternative
> proposal in the attached patch that queues up an ALTER TABLE ... REPLICA
> IDENTITY command into the normal ALTER TABLE processing. I have also
> added tests to the test suite.
>
> LGTM. Tests are ok. I've rebased it (because
61d7c7bce3686ec02bd64abac742dd35ed9b9b01). Are you planning to backpatch
it? IMHO you should because it is a bug (since REPLICA IDENTITY was
introduced in 9.4). This patch can be applied as-is in 12 but not to other
older branches. I attached new patches.

Regards,

--
Euler Taveira http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
v5-11-0001-Preserve-replica-identity-index-across-ALTER-TABLE-r.patch application/x-patch 8.5 KB
v5-12-0001-Preserve-replica-identity-index-across-ALTER-TABLE-r.patch application/x-patch 8.5 KB
v5-96-0001-Preserve-replica-identity-index-across-ALTER-TABLE-r.patch application/x-patch 8.7 KB
v5-95-0001-Preserve-replica-identity-index-across-ALTER-TABLE-r.patch application/x-patch 8.7 KB
v5-10-0001-Preserve-replica-identity-index-across-ALTER-TABLE-r.patch application/x-patch 8.9 KB
v5-master-0001-Preserve-replica-identity-index-across-ALTER-TABLE-r.patch application/x-patch 8.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2020-03-10 13:18:13 Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager
Previous Message Robert Haas 2020-03-10 13:09:03 Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager