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 1mxLeU-0008Cy-P4 for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Dec 2021 04:12:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mxLeT-00074T-L5 for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Dec 2021 04:12:25 +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 1mxLeT-00074E-7Z for pgsql-hackers@lists.postgresql.org; Wed, 15 Dec 2021 04:12:25 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mxLeQ-0005Zd-Ej for pgsql-hackers@postgresql.org; Wed, 15 Dec 2021 04:12:24 +0000 Received: by mail-pj1-x1029.google.com with SMTP id gj24so2252517pjb.0 for ; Tue, 14 Dec 2021 20:12:22 -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=ZlrbPpX/Dvfyy1rYSCw/mljKmq3a+kZcvNpEbKeojys=; b=pCci9oGHbF0B2pXfCO3+4EK+AemnKDuyVEyVA8txEFpm9rS0geop4s0NBdo1owrpEh a2kGrnF/bWrU5nUhooyhD2MA3zCajmDZ+AfOQPQu9k8U5beKg0VBc/Gkv76iZ7n58pty IvJ3KsfmDWVCs4jm6+w7ILCU0Rtm1a8J+7nVyT7nBoHt2FAkomdVtaM98PHPfEam6rno S3LjwMWD05pIb2w+7RfN9YCnzFfjQxxhiuxgCPOE9R9mi1TGd+4kZh2KPEzmyQhTzEA0 zAH4so0aPVawDyhMVmr/+oKV3FxcPSxTHpfId8zgpYL3ZMxqOhqHB8nYtNSa9vR+zin1 IVRA== 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=ZlrbPpX/Dvfyy1rYSCw/mljKmq3a+kZcvNpEbKeojys=; b=o6S6ZzWAxWMh+sOlOz3a4/jcas2t1NOI34rEL2H/64MW1OTZ80v7wkU14i08SKtAc/ bo3pKMlCIO4oxQf3LF7eFc7UDUBmUUoJ93yyiMBQu4KTpJbojIndRfNvcIEeJ7h9mvMA R8hptRSaqsB9duCTQciM1hEt9M+OoBKq3Zk4USgXCHEV2RFh0A2T7CcWCHCsa3dCviaM 6ConfcEhSCyO/pkywwhme5L5c6ScabOOkkWzMk85vCBoPvZ40oBaPRWCon9ZDIDmqtB3 xdrhf3O15v+r7CADw3QTSTppPe/IEBrECcBUsUN2WXwxlhPVJKBLtN9whzXBbII6F/6K opog== X-Gm-Message-State: AOAM530Kg9jahK5jUS+opktwWxz4uwy/MQf9DXzYqsRl6O2F7S4k3B97 7FGDY5okJCAViOBFS3Q2cQg= X-Google-Smtp-Source: ABdhPJwXQbLNf2MFPJP9pxulLWVBRPihjvNCv/R1I8PxGgQ2aDxgvfkoqZ+V5AfO7Mxgj2ssMBUaEg== X-Received: by 2002:a17:90b:3ec2:: with SMTP id rm2mr9964017pjb.1.1639541541360; Tue, 14 Dec 2021 20:12:21 -0800 (PST) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id u22sm569097pfi.187.2021.12.14.20.12.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 14 Dec 2021 20:12:20 -0800 (PST) Date: Wed, 15 Dec 2021 13:12:18 +0900 (JST) Message-Id: <20211215.131218.807653512113171629.horikyota.ntt@gmail.com> To: ashutosh.bapat.oss@gmail.com Cc: 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: <20211214.130456.2233153190058148084.horikyota.ntt@gmail.com> User-Agent: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Wed_Dec_15_13_12_18_2021_960)--" Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ----Next_Part(Wed_Dec_15_13_12_18_2021_960)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit At Tue, 14 Dec 2021 19:31:21 +0530, Ashutosh Bapat wrote in > On Tue, Dec 14, 2021 at 9:35 AM Kyotaro Horiguchi > wrote: > > > [17605] LOG: terminating process 17614 to release replication slot "s1" > > + [17605] DETAIL: The slot's restart_lsn 0/2C0000A0 exceeds max_slot_wal_keep_size. > > > [17614] FATAL: terminating connection due to administrator command > > > [17605] LOG: invalidating slot "s1" because its restart_lsn 0/2C0000A0 exceeds max_slot_wal_keep_size > > > > Somewhat the second and fourth lines look inconsistent each other but > > that wouldn't be such a problem. I don't think we want to concatenate > > the two lines together as the result is a bit too long. > > > > > LOG: terminating process 17614 to release replication slot "s1" because it's restart_lsn 0/2C0000A0 exceeds max_slot_wal_keep_size. > > > > What do you think about this? > > Agree. I think we should also specify the restart_lsn value which > would be within max_slot_wal_keep_size for better understanding. Thanks! It seems to me the main message of the "invalidating" log has no room for further detail. So I split the reason out to DETAILS line the same way with the "terminating" message in the attached second patch. (It is separated from the first patch just for review) I believe someone can make the DETAIL message simpler or more natural. The attached patch set emits the following message. > LOG: invalidating slot "s1" > DETAIL: The slot's restart_lsn 0/10000D68 is behind the limit 0/11000000 defined by max_slot_wal_keep_size. The second line could be changed like the following or anything other. > DETAIL: The slot's restart_lsn 0/10000D68 got behind the limit 0/11000000 determined by max_slot_wal_keep_size. ..... regards. -- Kyotaro Horiguchi NTT Open Source Software Center ----Next_Part(Wed_Dec_15_13_12_18_2021_960)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="v2-0001-Make-an-error-message-about-process-termination-m.patch"