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 1juGTv-0002Uh-Dr for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Jul 2020 14:27:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1juGTu-0005nm-C6 for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Jul 2020 14:27:58 +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 1juGTu-0005nf-5Q for pgsql-hackers@lists.postgresql.org; Sat, 11 Jul 2020 14:27:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1juGTs-0008Dj-Oq for pgsql-hackers@lists.postgresql.org; Sat, 11 Jul 2020 14:27:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 06BERrBu2210889; Sat, 11 Jul 2020 10:27:53 -0400 From: Tom Lane To: Alvaro Herrera cc: pgbf@twiska.com, Kyotaro Horiguchi , masao.fujii@oss.nttdata.com, pgsql-hackers@lists.postgresql.org Subject: Re: min_safe_lsn column in pg_replication_slots view In-reply-to: <20200710234037.GA24580@alvherre.pgsql> References: <20200710234037.GA24580@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 10 Jul 2020 19:40:37 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2210887.1594477673.1@sss.pgh.pa.us> Date: Sat, 11 Jul 2020 10:27:53 -0400 Message-ID: <2210888.1594477673@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2020-Jul-09, Alvaro Herrera wrote: >> I think we should define InvalidXLogSegNo to be ~((uint64)0) and add a >> macro to test for that. > That's overkill really. I just used zero. Running > contrib/test_decoding under valgrind, this now passes. > I think I'd rather do away with the compare to zero, and initialize to > something else in GetWALAvailability, though. What we're doing seems > unclean and unclear. Is zero really not a valid segment number? regards, tom lane