From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: yxq@o2.pl
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14785: Logical replication does not work after adding a column. Bug?
Date: Tue, 26 Sep 2017 11:19:47 -0700
Message-ID: <20170926181947.2slrmvpiqvlbtxej@alap3.anarazel.de> (raw)
In-Reply-To: <32004.1506449841@sss.pgh.pa.us>
References: <4dfb4e26-9542-85d6-ff61-9e7080796b0e@2ndquadrant.com>
<20170823163151.5dankkw7z72ltmvw@alap3.anarazel.de>
<020d1ec1-70d6-a4e9-f7f6-ab7eed8f5985@2ndquadrant.com>
<20170823213949.g7wpurzt6hbi3e5h@alap3.anarazel.de>
<def3109a-81b6-e6ab-e632-31c34434a90f@2ndquadrant.com>
<20170925191655.xcn3tsnuibep3jro@alap3.anarazel.de>
<073783f4-ccf0-65d8-ffa2-01d339958978@2ndquadrant.com>
<11184.1506440634@sss.pgh.pa.us>
<20170926155633.GM4628@tamriel.snowman.net>
<32004.1506449841@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 2017-09-26 14:17:21 -0400, Tom Lane wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> > * Tom Lane (tgl@sss.pgh.pa.us) wrote:
> >> This patch is using the wrong approach entirely. Every other place in
> >> the backend that is trying to exclude temp relations uses a test on the
> >> containing namespace, not the relname.
>
> > The specific issue here is that the new pg_class entry is created in the
> > same namespace, not in the temp one. The commit mentions make_new_heap()
> > specifically because that's where the issue is coming from because
> > that's creating this new pg_temp_XXX table in the regular user
> > namespace.
>
> Um ... but that transient relation should never be visible to any other
> backend, because we delete it before committing. If there is someplace
> where this is not the case, then we need to change that, because it'll
> break everything else that scans pg_class, such as VACUUM.
This is accessed during logical decoding, for filtering purposes.
Because outputting all those rewritten rows for a temp relation isn't
helpful, rather to to the contrary.
Obviously it'd be better if we'd some nicer infrastructure, but that
seems like something for v11+.
> In short: this code is unlike every other similar check in the backend.
> I find it unlikely that this is right and all the others are wrong.
I don't think those checks are comparable.
Greetings,
Andres Freund
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, sfrost@snowman.net, peter.eisentraut@2ndquadrant.com, yxq@o2.pl
Subject: Re: BUG #14785: Logical replication does not work after adding a column. Bug?
In-Reply-To: <20170926181947.2slrmvpiqvlbtxej@alap3.anarazel.de>
References: <4dfb4e26-9542-85d6-ff61-9e7080796b0e@2ndquadrant.com> <20170823163151.5dankkw7z72ltmvw@alap3.anarazel.de> <020d1ec1-70d6-a4e9-f7f6-ab7eed8f5985@2ndquadrant.com> <20170823213949.g7wpurzt6hbi3e5h@alap3.anarazel.de> <def3109a-81b6-e6ab-e632-31c34434a90f@2ndquadrant.com> <20170925191655.xcn3tsnuibep3jro@alap3.anarazel.de> <073783f4-ccf0-65d8-ffa2-01d339958978@2ndquadrant.com> <11184.1506440634@sss.pgh.pa.us> <20170926155633.GM4628@tamriel.snowman.net> <32004.1506449841@sss.pgh.pa.us> <20170926181947.2slrmvpiqvlbtxej@alap3.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox