Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mx6Fb-0005sw-Vg for pgsql-bugs@arkaria.postgresql.org; Tue, 14 Dec 2021 11:45:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mx6Fa-0002fC-TV for pgsql-bugs@arkaria.postgresql.org; Tue, 14 Dec 2021 11:45:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mx4fi-00009n-3S for pgsql-bugs@lists.postgresql.org; Tue, 14 Dec 2021 10:04:34 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mx4fb-0005W6-85 for pgsql-bugs@lists.postgresql.org; Tue, 14 Dec 2021 10:04:32 +0000 Received: by mail-wm1-x333.google.com with SMTP id 133so13860416wme.0 for ; Tue, 14 Dec 2021 02:04:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=altmetric.com; s=google; h=date:from:subject:to:cc:message-id:in-reply-to:references :mime-version; bh=l+1M/GTbK3X0nyoIOmN10eXDlARwMNZRVRA9REzazFA=; b=a8JeRxwsl1iKO+/DS+KA0vo0XVrkgM0azhZNr8g07ZV5xDbe/GEpoomi7liuwb8JeC 02G9+M0emY5UcObta6EFpZyCPN0J1S2n2ULq5TSV62ZC6rHOBodnT6rHM6RZLxhYyWJS 5R7MHU51HDuawVIF62aAruDImQFRY1tV4DwzY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:subject:to:cc:message-id:in-reply-to :references:mime-version; bh=l+1M/GTbK3X0nyoIOmN10eXDlARwMNZRVRA9REzazFA=; b=nHsMMyVbBjOFUtlufLaOG7dp09QarIb2R8Eh1ycdLfGAXhM/IXfz7QT5g+OLdLJmqg SHX1FhxQBfcJhYVUBD2ytma5LSpanbu9SsWfIkOAV9fU9nUl/WSV/YXPk655HTGyOsgR E3q1cuPdtlFtNlyX1WSlS5xVS8IGqtlYnGXoJ7pXKMtjXj+3r6DgfxasQ+SMzA6qeWwj WF5xQBRVwxI0YPx72a7Kajot7/7qksT8F9CekEnj0ISVyQMAa8WIyT3amHWP03DLjsya F2NnLi6uRHxFM702y7Y7+Pkm6gBr5nHKatrXKnLj8Ol1js/w/UThqu3T8eyfMR/xx+QS PwDQ== X-Gm-Message-State: AOAM530XJWK8z/eAE/2Sf4+KmLxSDfAZHGdW75R6vA1Y2Go/WPP9OVO/ D7qOTHQTZtjMdg3lBeH8+xZEkg== X-Google-Smtp-Source: ABdhPJwOIKfaqxeCAvl6Q7gspdBMjxSqO3V4Ab+jfJ4AJ5bRVJpMXbjFxwzMTtfQt5b0DsAoT61egg== X-Received: by 2002:a7b:c017:: with SMTP id c23mr5780293wmb.137.1639476265500; Tue, 14 Dec 2021 02:04:25 -0800 (PST) Received: from [192.168.1.163] (10.16.93.209.dyn.plus.net. [209.93.16.10]) by smtp.gmail.com with ESMTPSA id m125sm1561677wmm.39.2021.12.14.02.04.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Dec 2021 02:04:25 -0800 (PST) Date: Tue, 14 Dec 2021 10:03:49 +0000 From: Alex Enachioaie Subject: Re: BUG #17327: Postgres server does not correctly emit error for max_slot_wal_keep_size being breached To: Kyotaro Horiguchi Cc: pgsql-bugs@lists.postgresql.org Message-Id: In-Reply-To: <20211214.101137.379073733372253470.horikyota.ntt@gmail.com> References: <20211213.144442.1533332056665514669.horikyota.ntt@gmail.com> <20211214.101137.379073733372253470.horikyota.ntt@gmail.com> X-Mailer: geary/41.dev MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=-BAvXqIAMbDHhHZage3rR" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=-BAvXqIAMbDHhHZage3rR Content-Type: text/plain; charset=us-ascii; format=flowed Hello Kyotaro, Exactly and that sounds like an excellent solution. Thanks! Alex Enachioaie Senior Site Reliability Engineer Altmetric On Tue, Dec 14 2021 at 10:11:37 +0900, Kyotaro Horiguchi wrote: > Hello, Alex. > > At Mon, 13 Dec 2021 09:45:51 +0000, Alex Enachioaie > > wrote in >> I think I'm happy to leave the method of resolution up to you, I >> think >> the main point for me would be that when a >> replication process gets terminated as a consequence of the >> underlying >> temporary replication slot reaching max_slot_wal_keep_size >> that we log a specific message to indicate to the user the cause of >> the termination rather than leave it ambiguous. > > Ah.. I think I got your point. I thought that the message > "terminating process to release replication slot X" is showing the > cause for process termination but actually it doesn't mention the > reason for releasing replication slot. For persistent slots the > following message "invalidating slot" does that but that message is > absent for temporary slots. However, in that sense, the root reason > is not clearly stated in any case. > > So I'm going to propose something like the following. > > LOG: terminating process nnnnn to release replication slot "slot" > + DETAIL: The WAL files retained by the slot is going to exceed > max_slot_wal_keep_size. > > Thanks! > > -- > Kyotaro Horiguchi > NTT Open Source Software Center --=-BAvXqIAMbDHhHZage3rR Content-Type: text/html; charset=us-ascii
Hello Kyotaro,

Exactly and that sounds like an excellent solution.

Thanks!

Alex Enachioaie
Senior Site Reliability Engineer
Altmetric

On Tue, Dec 14 2021 at 10:11:37 +0900, Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote:
Hello, Alex. At Mon, 13 Dec 2021 09:45:51 +0000, Alex Enachioaie <alex@altmetric.com> wrote in
I think I'm happy to leave the method of resolution up to you, I think the main point for me would be that when a replication process gets terminated as a consequence of the underlying temporary replication slot reaching max_slot_wal_keep_size that we log a specific message to indicate to the user the cause of the termination rather than leave it ambiguous.
Ah.. I think I got your point. I thought that the message "terminating process to release replication slot X" is showing the cause for process termination but actually it doesn't mention the reason for releasing replication slot. For persistent slots the following message "invalidating slot" does that but that message is absent for temporary slots. However, in that sense, the root reason is not clearly stated in any case. So I'm going to propose something like the following. LOG: terminating process nnnnn to release replication slot "slot" + DETAIL: The WAL files retained by the slot is going to exceed max_slot_wal_keep_size. Thanks!
--
Kyotaro Horiguchi NTT Open Source Software Center
--=-BAvXqIAMbDHhHZage3rR--