Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSW3M-0006Db-Du for pgsql-committers@arkaria.postgresql.org; Mon, 11 Jun 2018 23:16:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fSW3K-0002MH-QQ for pgsql-committers@arkaria.postgresql.org; Mon, 11 Jun 2018 23:16:46 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSW3J-0002LS-JR; Mon, 11 Jun 2018 23:16:46 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSW3B-00070n-LH; Mon, 11 Jun 2018 23:16:40 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 5F41C21DFF; Mon, 11 Jun 2018 19:16:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 11 Jun 2018 19:16:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=YgdnnkqBu92v5XXJ/jjdMi4hBfZyQ2Up7q4soRV6SgQ=; b=EnDW/hLU t7CXudBSnzXYr41YIF8uOZ92K5qr0He69+KckzZiYSji0FyJu5j8pmK76Zv8FEqv 6kvSpg6zkLS0zlNiZsKq7FJA8wrHv6dXlsuBViC9zrRL4kRK5gT7mGjuysUCDwCN uqSKh112GzSAYnTEOFNG9JipSbIE+4UxMXAt27acAglDdnJGDBu/9+CFtbdur/oy F0sU0Qtzxiah58BbftjpDIpVAnLpYhhcTE91fXG9kMo3cMeZisZbT3YXYurrWVTK S57Nv+et8XV/Xd17Zh5xkS7fJhPRr2wKDnC++0XxaRTVc4PtN4zZFj5zJLDK6FH/ HshKFhPgSy53FA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=YgdnnkqBu92v5XXJ/jjdMi4hBfZyQ 2Up7q4soRV6SgQ=; b=glo2G51dt9b4AvdCDr6mF2LhGHUaPtBMyQhK4tuIbhbff eMCxHkykibayz/YQkGnySx/A67+98O7ZyToUzuhA9IY0XEuLcGQAEVmJSYHT+NfC 5vW7jTiRtLQGMuUHJAFM7r+dUq3i8cx97hgTQAXZu5bAffQXzUDBLqYPMCXg9NIG UYUf5WW1IPIDJuQcazKgKddk5f4/A2yXGruY1rBkkDeD2NW1gl7u6Vo1U3Qc9QOg VxukXi2YypZhGzMq/I+ZUrzplvEkF71vHg1lub3NQzehFDrD++KazdTpFz6qQre4 ALUKkNX7N2DEdZbzgwr/X38q4CEsJAtafNXbQjNoA== X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from intern.anarazel.de (unknown [172.58.91.191]) by mail.messagingengine.com (Postfix) with ESMTPA id 010A910266; Mon, 11 Jun 2018 19:16:36 -0400 (EDT) Date: Mon, 11 Jun 2018 16:16:34 -0700 From: Andres Freund To: Peter Eisentraut , Petr Jelinek Cc: pgsql-committers@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [COMMITTERS] pgsql: Logical replication Message-ID: <20180611231634.w2rgtlzxaw4loefk@alap3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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