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 1n0fy5-0000zv-5V for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Dec 2021 08:30:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n0fy2-00040s-Hd for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Dec 2021 08:30:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n0fy2-00040j-6V for pgsql-hackers@lists.postgresql.org; Fri, 24 Dec 2021 08:30:22 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n0fy0-0005aQ-Qu for pgsql-hackers@postgresql.org; Fri, 24 Dec 2021 08:30:21 +0000 Received: by mail-pj1-x102f.google.com with SMTP id v13-20020a17090a088d00b001b0e3a74cf7so7717855pjc.1 for ; Fri, 24 Dec 2021 00:30:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:message-id:to:cc:subject:from:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=7NuOam2HOBwqIicKsTv11dquaJ0F02lfifj4Val0+1k=; b=IQdBMsD9E1uN/d24+ilJU0bNz32ayPfIi95zZl9EU7oysiBKH/qOAKbCJr3a21FDd6 2mdiOt9UEkzaAs8PSA1Ze2nNIAawSBmhRdKduFVkdaULXsQW9qaozQ5yBhbIOlxXpI+q 7ntHgEHZcpKIFwzfso2f3zAZK8me7jcoP4iWJlgc/NZVa2Kwka6dvU6Nx81yG9Rj0vEN VUZ183Ag+kOQSculkaESmcATc5VErxmL1vKmZvQy99RhaWrGpuY6hqDreF2u7IgANm3I TF+iprw6BIbQGElL2ZJWrAW3C4fn8OzU/rE1fq2psmNbXu9snfuniLgGOHomsidJuc75 DZBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:to:cc:subject:from:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=7NuOam2HOBwqIicKsTv11dquaJ0F02lfifj4Val0+1k=; b=2FSvX+qItGRi8M2BauxIvFimr5sNj3ILkhYy9iuvz81dt/U8eFb+hRIEppbs8uPtWf KzS944OiSZ2GypbgghplrUmofcZtsFP6UIRDTFON9QHSdGdatN7iyMqMzL78pWhyH3Bo FYXsUgTr7WiolC6y/rOExdP1XCUkMIo4aVpx3ZIeRoLPQY3wS0Bo9nOcJ2mb4mwgDSwb RM4wFcc4ClZwq5SwqhDKFY0q2EPjGF9gARRUrGymC0mHQIQpPQ2Aoh1oKvUwYK4vtSQB 2+NQZYqeR//F2rbyYK0eKo6p4tq+aRpzO9XRx/7f+2HrbKC/Gv1UibOSBeNEg3E5Zhf0 kXfw== X-Gm-Message-State: AOAM531ufF6ps3TzhnHcWe3IUNDapHlBYN1578AmwESy9CZY3ZMIQGOe aTch2Frea3HGTXpAPeqVmaoSQrTjyuY= X-Google-Smtp-Source: ABdhPJwee9Yq9AKfiptWHyw/hPgi5e0j2++KbfhSl0AHl46L+bQLyiVg8xk0L0F2+fr0+8JWIVv49A== X-Received: by 2002:a17:90a:880a:: with SMTP id s10mr7018377pjn.214.1640334618769; Fri, 24 Dec 2021 00:30:18 -0800 (PST) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id e9sm7095035pgp.39.2021.12.24.00.30.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 24 Dec 2021 00:30:18 -0800 (PST) Date: Fri, 24 Dec 2021 17:30:16 +0900 (JST) Message-Id: <20211224.173016.2237752923975758130.horikyota.ntt@gmail.com> To: sawada.mshk@gmail.com Cc: ashutosh.bapat.oss@gmail.com, pgsql-hackers@postgresql.org Subject: Re: more descriptive message for process termination due to max_slot_wal_keep_size From: Kyotaro Horiguchi In-Reply-To: References: <20211224.134214.1646603596386019768.horikyota.ntt@gmail.com> User-Agent: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thank you for the comment. At Fri, 24 Dec 2021 17:06:57 +0900, Masahiko Sawada wrote in > Thank you for the patch! +1 for improving the messages. > > > > > > LOG: terminating process %d to release replication slot \"%s\" because its restart_lsn %X/%X exceeds max_slot_wal_keep_size > > > DETAIL: The slot got behind the limit %X/%X determined by max_slot_wal_keep_size. > > > > > LOG: invalidating slot \"%s\" because its restart_LSN %X/%X exceeds max_slot_wal_keep_size > > c> DETAIL: The slot got behind the limit %X/%X determined by max_slot_wal_keep_size. > > - > LSN_FORMAT_ARGS(restart_lsn)))); > + > LSN_FORMAT_ARGS(restart_lsn)), > + errdetail("The slot > got behind the limit %X/%X determined by max_slot_wal_keep_size.", > + > LSN_FORMAT_ARGS(oldestLSN)))); > > Isn't oldestLSN calculated not only by max_slot_wal_keep_size but also > by wal_keep_size? Right. But I believe the two are not assumed to be used at once. One can set wal_keep_size larger than max_slot_wal_keep_size but it is actually a kind of ill setting. LOG: terminating process %d to release replication slot \"%s\" because its restart_lsn %X/%X exceeds max_slot_wal_keep_size DETAIL: The slot got behind the limit %X/%X determined by max_slot_wal_keep_size and wal_keep_size. Mmm. I don't like this. I feel we don't need such detail in the message.. I'd like to hear opinions from others, please. regards. -- Kyotaro Horiguchi NTT Open Source Software Center