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.96) (envelope-from ) id 1wRMfV-002I11-0a for pgsql-hackers@arkaria.postgresql.org; Mon, 25 May 2026 04:11:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wRMfR-00HUSu-1O for pgsql-hackers@arkaria.postgresql.org; Mon, 25 May 2026 04:11:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wRMfR-00HUSl-0G for pgsql-hackers@lists.postgresql.org; Mon, 25 May 2026 04:11:54 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wRMfQ-00000000e7K-1Fa9 for pgsql-hackers@postgresql.org; Mon, 25 May 2026 04:11:53 +0000 Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-36622412e97so6959989a91.2 for ; Sun, 24 May 2026 21:11:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1779682311; cv=none; d=google.com; s=arc-20240605; b=icVuw3w/pV2TKO4LC0pxs9OGuI/yyJaRNqtA1B23L8vkrC0EBLrfngPljvbjzK+ELc 3zXe/s5SzAG8jOoiU5swh3H9B628a+8sZ7fjHtqMwXcbEFPEvYV89PKFCNBKtIaiMKM9 QdyvUyd5PH/t6QKHfr76lQzuos2KxBTZndz6rAeDHp5sysb7umPzvqnA2ZGJ50sZ5Nmf xHzxGMQ+Sxo4fC4XUnH+EHKR9453l3lG6/Pb960dtSWIDIKpKhM2ZK4hNvZXaJod62r8 9+CwDwNFbISY9u7jyMsh7uG7foPQCPzOiFCmeloy2+26HgnyMCHf/k9vSJ7xEVed7KnZ Yu0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+IwqirsUGRzkMMf/V6XA/4uu9qiu8C+3PS0yvMp+tak=; fh=4aeQc9QcexxRZZwwRK9y4MxON6Yae0dIUN3RwhLm+o8=; b=ZY1UcnzYKDImo2BsNUy+++E60ewlOWjy7b/hdsOyCyfX0Uew3gMeP/0sAGmExtYNft dCRXDUeuOGMjvNYa6mZhSLuDEEg5orPhJBUgZK8DT2TKBXv+1i4FhsnmvUocJRW2Fm1G App9i9+wSUO5n/F0ebKdDKwPwUYUwauK45QnCxu+zaILxcmZdthwrNAwp8zzLuOWVeWc frScD1oNYFHVwfkyu5/X5epvABAZd20EzIwZiwIuaQ7ZRib8muSeCQTSBvM3tphN4bQt JHcl8Kt3BMiPKltqQD1jen4fmV0lwaC8InetSZsLgbtV3xFiD1pywey2zebgVyaGhtMa OEcg==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779682311; x=1780287111; darn=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=+IwqirsUGRzkMMf/V6XA/4uu9qiu8C+3PS0yvMp+tak=; b=b96Pq/SWKkE7UDZ5SS0TZmPsNNz2LVv98o9/7a7xMEQgm3Oy01BopDk1yvPD6xEckZ sVF4Sqi/kYhzQvkLt61XboKkrjsmhV1SK/q93CjfVjR+1JfQOqG2gX0HWmmzqNbe+ntA jmNuozRXbaP2p78Cc9bLmtrraiIbWtFUXhk6tThRySMIX88lsv8eDpWtJpQwhoYnDUKn w4D/sJeKX0KRm01NGyy3VLJ21U8dmHyOUd13R67/RDOYiIkvIkwS7PlJgT/mhq/qiIBW Os598UwxNW7AwnJVZ77aTsVs2MgwyrRSDfC7Vb/mtLi3mfJAJ2oMFqQoM7FxW4+XCEo0 ThfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779682311; x=1780287111; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+IwqirsUGRzkMMf/V6XA/4uu9qiu8C+3PS0yvMp+tak=; b=S7M8FDjgdMQWjuBtUGwjA934Jjbh92VAqjTG052rka6C2DQUod9u/I2+6DHPEqEjJP pJXGXQVaZhE1daAmnaejD997OI1bVZpk2tzjYRI3Pp+yvR5QFgZd2qhxSsUwlyr0Gq0I dyfLj3AIDEoj2sxE5jOJM6cv3BYwvIo3Pf41EVDH7vgT+6HnVDDUojjYIZmp8IRvI5U6 U5olcgAknBSUnnouOvrvT5vK/A9nk1NDb+CoBsOyrWte5bt558lbI6XopvepfHitzCMa PCtAGgiD0ayZEZTOFJsq08aFTYXlMsmhC0lKB+LZLpmklnF4y9zY1dL7PGRH2iPrE/ow 12ZQ== X-Forwarded-Encrypted: i=1; AFNElJ9hhwleNznmxHgS4Ub9DIwVmXiu3Jvw/fP8oaPqfhdABUqKPGXi3FGVgXTHMrUFm9PkaO3fcqnmCShIPFrl@postgresql.org X-Gm-Message-State: AOJu0YyluT75t5RfKmHz9M/dO/U4OmCouxYa6zCDjlP/STbgJhYRprec aOKIu2fIXhES7P2hqbtm6xI9bbNFPvNocN6qD9NvEYRdALk19RgkdivoBIFe0Gqr2ybficUaUnz WS3ClbOuV5pqdrmR9O/0lmFAoiTwCBMw= X-Gm-Gg: Acq92OFQH1IXPVpXynMTa+Zg5ZVuejPXQTJMO8XvCdoDeRjvrF2AhgWuqHOKokMf0mK fQkCCCjbTDZdWvPTvBTVYQhba7yYc1LACjL6AE0LkruTgfqU313xdRDg/sClMmqHg7poR6bqbML LI5JqgtDW6YxUduhDJnSRAy+IqyE5muVbYHt/zYDKD1oMEB+WLdD+QDJKq7mwh5tpNFmJ2R5snh E6NLUR4+sT5K1dTrR/D0tHWcxh2vpOq1fvGmkldZb1vqQaRJ+yN/2nsrSSqJjZGq3CnFrIfAGdz zX1MeZ/gbJATx1M7zlo608nBAsPIcGX/SuNF3/rHE02K4poZA98= X-Received: by 2002:a17:90b:38cc:b0:369:de03:29c8 with SMTP id 98e67ed59e1d1-36a6764cb9cmr12767273a91.23.1779682311114; Sun, 24 May 2026 21:11:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: shveta malik Date: Mon, 25 May 2026 09:41:38 +0530 X-Gm-Features: AVHnY4JsLd13dRPhRHpoq31aUEITxnQO93MXnKtp81umN10LUh3VYacwCskvF-Q Message-ID: Subject: Re: effective_wal_level is not decreasing after using REPACK (CONCURRENTLY) To: Imran Zaheer Cc: Masahiko Sawada , pgsql-hackers , shveta malik 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 Sat, May 23, 2026 at 2:49=E2=80=AFPM Imran Zaheer = wrote: > > Hi > > Thanks for the review. In the attached patch, I added an argument that > will help explicitly control whether to stop logical decoding or not. > > -ReplicationSlotDropAcquired(void) > +ReplicationSlotDropAcquired(bool disable_logical_decoding) > > I hope this will be enough to make the caller intent more explicit and > will prevent future omissions like this. > Overall it looks good. I have a few trivial comments; please incorporate them if you agree. 1) +ReplicationSlotDropAcquired(bool disable_logical_decoding) We can change comments atop this function. Suggestion : /* * Permanently drop the currently acquired replication slot and * request the checkpointer to disable logical decoding if requested * by the caller. */ 2) Additionally I think it will be good to have below sanity check in ReplicationSlotDropAcquired(). Thoughts? /* Ensure that slot is logical if caller has requested to disable logical decoding */ Assert(!disable_logical_decoding || SlotIsLogical(MyReplicationSlot)); 3) @@ -567,7 +567,7 @@ drop_local_obsolete_slots(List *remote_slot_list) if (synced_slot) { ReplicationSlotAcquire(NameStr(local_slot->data.name), true, false); - ReplicationSlotDropAcquired(); + ReplicationSlotDropAcquired(false); } Since it is a logical slot and we are still passing false, we may add a comment. Suggestion: /* * We don't want to disable logical decoding during slot drop on the * physical standby, since the standby derives the logical decoding * state from the upstream server in the replication chain. */ thanks Shveta