Re: logical replication worker accesses catalogs in error context callback

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Zhihong Yu <zyu(at)yugabyte(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: logical replication worker accesses catalogs in error context callback
Date: 2021-07-02 20:49:17
Message-ID: 1155548.1625258957@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Didn't look at 0002 yet.

... and now that I have, I don't like it much. It adds a lot of
complexity, plus some lookup cycles that might be wasted. I experimented
with looking into the range table as I suggested previously, and
that seems to work; see attached. (This includes a little bit of
code cleanup along with the bug fix proper.)

An interesting point here is that the range table data will represent
table and column aliases, not necessarily their true names. I don't
find that wrong, it's just different from what the code presently
does. If we go with this, likely we should change the plain-relation
code path so that it also prints aliases from the RTE instead of
the actual names.

regards, tom lane

Attachment Content-Type Size
v7-0002-Avoid-Catalogue-Accesses-In-conversion_error_call.patch text/x-diff 2.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-07-02 20:51:51 Re: Add proper planner support for ORDER BY / DISTINCT aggregates
Previous Message Gavin Flower 2021-07-02 20:37:40 Re: Add proper planner support for ORDER BY / DISTINCT aggregates