From: | Amit Langote <amitlangote09(at)gmail(dot)com> |
---|---|
To: | "osumi(dot)takamichi(at)fujitsu(dot)com" <osumi(dot)takamichi(at)fujitsu(dot)com> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Japin Li <japinli(at)hotmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Forget close an open relation in ReorderBufferProcessTXN() |
Date: | 2021-05-20 12:58:47 |
Message-ID: | CA+HiwqE_YmqT23a+hGipnGHa3wmjCT-1DcECfrYaiiyDCkci+w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, May 20, 2021 at 5:59 PM osumi(dot)takamichi(at)fujitsu(dot)com
<osumi(dot)takamichi(at)fujitsu(dot)com> wrote:
> On Tuesday, May 18, 2021 3:30 PM Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> > While doing so, it occurred to me (maybe not for the first time) that we are
> > *unnecessarily* doing send_relation_and_attrs() for a relation if the changes
> > will be published using an ancestor's schema. In that case, sending only the
> > ancestor's schema suffices AFAICS. Changing the code that way doesn't
> > break any tests. I propose that we fix that too.
> I've analyzed this new change's validity.
> My conclusion for this is that we don't have
> any bad impact from this, which means your additional fix is acceptable.
> I think this addition blurs the purpose of the patch a bit, though.
Okay, I've extracted that change into 0002.
> With the removal of the send_relation_and_attrs() of the patch,
> we don't send one pair of LOGICAL_REP_MSG_TYPE('Y'),
> LOGICAL_REP_MSG_RELATION('R') message to the subscriber
> when we use ancestor. Therefore, we become
> not to register or update type and relation for maybe_send_schema()'s
> argument 'relation' with the patch, in the case to use ancestor's schema.
> However, both the pgoutput_change() and pgoutput_truncate()
> have conditions to check oids to send to the subscriber for any operations.
> Accordingly, the pair information for that argument 'relation'
> aren't used on the subscriber in that case and we are fine.
Thanks for checking that.
Here are updated/divided patches.
--
Amit Langote
EDB: http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
HEAD-v5-0001-pgoutput-fix-memory-management-of-RelationSyncEnt.patch | application/octet-stream | 5.1 KB |
PG13-v5-0002-pgoutput-don-t-send-leaf-partition-schema-when-pu.patch | application/octet-stream | 2.0 KB |
HEAD-v5-0002-pgoutput-don-t-send-leaf-partition-schema-when-pu.patch | application/octet-stream | 2.1 KB |
PG13-v5-0001-pgoutput-fix-memory-management-for-RelationSyncEn.patch | application/octet-stream | 5.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2021-05-20 13:01:11 | Re: pg_rewind fails if there is a read only file. |
Previous Message | osumi.takamichi@fujitsu.com | 2021-05-20 12:39:06 | RE: Forget close an open relation in ReorderBufferProcessTXN() |