From: Andres Freund <andres@anarazel.de>
To: Peter Eisentraut <peter_e@gmx.net>
To: Petr Jelinek <petr@2ndquadrant.com>
Cc: pgsql-committers@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Logical replication
Date: Mon, 11 Jun 2018 16:16:34 -0700
Message-ID: <20180611231634.w2rgtlzxaw4loefk@alap3.anarazel.de> (raw)
In-Reply-To: <E1cUZpa-0003IB-37@gemulon.postgresql.org>
References: <E1cUZpa-0003IB-37@gemulon.postgresql.org>
Hi,
On 2017-01-20 14:06:18 +0000, Peter Eisentraut wrote:
> Logical replication
>
> - Add PUBLICATION catalogs and DDL
> - Add SUBSCRIPTION catalog and DDL
> - Define logical replication protocol and output plugin
> - Add logical replication workers
I know I mentioned this before, but I just hit it again. Please split
up your commits in more logical chunks. This has a *LOT* of largely
unrelated pieces. Lots of them without so much as a comment about why
they have been changed. The above certainly doesn't explain why the
*generic* cache invalidation code was affected:
@@ -509,8 +514,10 @@ RegisterRelcacheInvalidation(Oid dbId, Oid relId)
/*
* If the relation being invalidated is one of those cached in the local
* relcache init file, mark that we need to zap that file at commit.
+ * Same is true when we are invalidating whole relcache.
*/
- if (OidIsValid(dbId) && RelationIdIsInInitFile(relId))
+ if (OidIsValid(dbId) &&
+ (RelationIdIsInInitFile(relId) || relId == InvalidOid))
transInvalInfo->RelcacheInitFileInval = true;
}
I mean, like, seriously? What is this stuff about?
I kinda guess the motivating factor is:
/*
* CacheInvalidateRelcacheAll
* Register invalidation of the whole relcache at the end of command.
*
* This is used by alter publication as changes in publications may affect
* large number of tables.
*/
void
CacheInvalidateRelcacheAll(void)
{
PrepareInvalidationState();
RegisterRelcacheInvalidation(InvalidOid, InvalidOid);
}
but that doesn't explain why it's not tied to a database? Nor why the
relcache init file is now invalidated when there's a publication change?
Greetings,
Andres Freund
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-committers@postgresql.org
Cc: andres@anarazel.de, peter_e@gmx.net, petr@2ndquadrant.com, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Logical replication
In-Reply-To: <20180611231634.w2rgtlzxaw4loefk@alap3.anarazel.de>
References: <E1cUZpa-0003IB-37@gemulon.postgresql.org> <20180611231634.w2rgtlzxaw4loefk@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