Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tuCyB-005Dqz-TO for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Mar 2025 16:05:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tuCy9-00FDh7-M6 for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Mar 2025 16:05:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tuCy9-00FDgy-BV for pgsql-hackers@lists.postgresql.org; Mon, 17 Mar 2025 16:05:37 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tuCy5-003Oha-24 for pgsql-hackers@lists.postgresql.org; Mon, 17 Mar 2025 16:05:37 +0000 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-ac2af2f15d1so670479966b.1 for ; Mon, 17 Mar 2025 09:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742227534; x=1742832334; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=aSBH2ksGJBWAWoMhPdPZOvmH+Ku4Tub/lRTOOs6lmHo=; b=iBAIOV6JgXN3SyQ0+9SnpqqUyl7BevXdzEMmewY+p3eGHpD3pBTQkRi1gea6Co2uWN 4MWQHcp79pC2O7XCgBULTcfIIuRcVsXZSUK+tkrlMqvGvAYOGt/ctQ5PQxP/3FV4dgtl E+d7AG3com+ES0VAUBBQyAkiZkLYM+Gu3MrOkans08plymitS9kqVNEQWhdv+qJm2esk tk+/PA/b5x2rnE3djPkx26emlQc8rCBrsbDrHEeiOhuhSOU3NUlEsr9s6BZvVc9+vH4j 2xMEcwPvdBfWhDja3ia0N4TgrFyXEQ7KSMfjSQ1VMd90wyW7weLCvXsYK0V3thJbGCLp nKRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742227534; x=1742832334; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aSBH2ksGJBWAWoMhPdPZOvmH+Ku4Tub/lRTOOs6lmHo=; b=XJwiSHqqlvtO2C8gsGPpssASOIryKHt7MiHhzAKXP4zwqdUSn/Hf3l4FFhko/8V4nl Oslx7RGyp4vkaFxqhtnx+Wh/abEyolpQY9S1MV/PSIUggFbsd4gJELTu0fH+hlGvDIVF R4/d0wBGKItrN7M5RgJrMkJgi02BEt0Wje6vPXE9ITutYkd87LExXgHje/wM0O7w/qA9 8EBr8zGCuw310PmnqJLfjDU+3SNlh+SMwCnMCQmJ62arsuSDpF+LP4m0U9YDXVcHTDM6 yncGx2MxcAlTWWUdfnXn7EvsT0KTEwgXk8NjkflPtjLkID9b2HADYDszerLsDedIFRkb FFpA== X-Gm-Message-State: AOJu0YxXJdkhdo95GY4BmYzbuBoXH/TyrQz8NNO+ZucUhzDrwvaWLzDN Bln7sLKmE5Lb1SqZuVQ3hQlyFemSjJp+tEusHTWMBV07IM/PwNUAKHkgoK7bElan9RUrWr8MBWz JwQPjB3LfSgrl9lObe1EQtzjxwAQRT9qn X-Gm-Gg: ASbGncthcIGjUCtZVqyIB4aaSDD9oMx5IzCD579RFm4STm3krEDjFuziL78R1hYaLgU xa6+uIKyUWuh4FpdS9ucFfp0ENdHHNyDqf9R3x3VAP2AdHMx0bCbEj48LCS7R2valx2Ia6oY1qO 3P60JmcnJKGgTMyXoJEcoVYm8tvg== X-Google-Smtp-Source: AGHT+IFkhDY2//dMIWKshNVRC8kKsOp22KmBEq4a2ueSjfUiba/6rYV24aD2vC6T9yMbxWploIRRnsr4pFs8jhKEDPU= X-Received: by 2002:a17:907:360e:b0:ac2:6837:6248 with SMTP id a640c23a62f3a-ac38d443f31mr24853666b.30.1742227533463; Mon, 17 Mar 2025 09:05:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Robert Haas Date: Mon, 17 Mar 2025 12:05:22 -0400 X-Gm-Features: AQ5f1JoDoKu95Wsfusdckp8twH9GjIWG3Bp2_TyhrYR92JCpnquF7rza1F_YuTc Message-ID: Subject: Re: pgsql: Avoid invalidating all RelationSyncCache entries on publication To: Amit Kapila Cc: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Mar 13, 2025 at 12:00=E2=80=AFAM Amit Kapila wrote: > Avoid invalidating all RelationSyncCache entries on publication rename. > > On Publication rename, we need to only invalidate the RelationSyncCache > entries corresponding to relations that are part of the publication being > renamed. > > As part of this patch, we introduce a new invalidation message to > invalidate the cache maintained by the logical decoding output plugin. We > can't use existing relcache invalidation for this purpose, as that would > unnecessarily cause relcache invalidations in other backends. This seems like too much infrastructure for a niche optimization. If there are plans to use this new invalidation message type to optimize a bunch of other cases, then maybe it's worth it, but adding this just to cover the presumably-rare case of ALTER PUBLICATION .. RENAME doesn't seem worth it to me. --=20 Robert Haas EDB: http://www.enterprisedb.com