Re: Restore replication settings when modifying a field type

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Euler Taveira <euler(at)timbira(dot)com(dot)br>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: quanzongliang(at)gmail(dot)com, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Restore replication settings when modifying a field type
Date: 2020-01-03 09:14:11
Message-ID: 61d38b0e-0831-d206-8390-2a08bb51905d@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-11-01 04:39, Euler Taveira wrote:
> ATExecAlterColumnType records everything that depends on the column
> and for indexes it saves the definition (via pg_get_indexdef_string).
> Definition is not sufficient for reconstructing the replica identity
> information because there is not such keyword for replica identity in
> CREATE INDEX. The new index should call relation_mark_replica_identity
> to fix pg_index.indisreplident.

Yeah, I don't think we need to do the full dance of reverse compiling
the SQL command and reexecuting it, as the patch currently does. That's
only necessary for rebuilding the index itself. For re-setting the
replica identity, we can just use the internal API as you say.

Also, a few test cases would be nice for this patch.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-01-03 09:24:26 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
Previous Message Peter Eisentraut 2020-01-03 09:00:14 Re: Greatest Common Divisor