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 1juN17-0006xT-0a for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Jul 2020 21:26:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1juN15-0004s2-Lf for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Jul 2020 21:26:39 +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 1juN15-0004ru-8r for pgsql-hackers@lists.postgresql.org; Sat, 11 Jul 2020 21:26:39 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1juN10-0007rN-Ca for pgsql-hackers@lists.postgresql.org; Sat, 11 Jul 2020 21:26:35 +0000 Received: by mail-qt1-x844.google.com with SMTP id d27so7233066qtg.4 for ; Sat, 11 Jul 2020 14:26:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=tiQziIsg2St1JqkyqVVi6NTk81y9EdZG1BJ4YBGLyCc=; b=m72OG8KNraQgn6QN3mm8hJTMGu5wOVzB5OX9aWloGx1zZ0M37SpOQuYddiPB148AWz UrVFLtFZk5EpRHscozq2Afu5oRQudcMym9a/zydyPBsaVlockgzyConkPb7nTwICgTKU Uv9++wQZ/U/3E9xD0tMoa9wEgX/AYycAMM3cfrWwP8Ga2qXsVsQt8Awn7YExPleXke+o SYkkxwYgPOS1JH2hdIz8vcHytX53C9MGSbOItz6H5tGM/hh/F1icnhYAGqz0+fpLIg9B P8u7EtfNThouF8eehlZvtGqO3uNtOLQXjpabBgyuIN42CCLewcqjHrC1DBG3rNvPwYVk u77A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=tiQziIsg2St1JqkyqVVi6NTk81y9EdZG1BJ4YBGLyCc=; b=RT3hVLZEDfQgjMiAWAEWhrtXgOm9QQ1fQdKVJs1Bne1WRRn4Inuu+C1EJQ1hjrAdI/ bDBUHsqigkh1mRWM+ECv6S7eX45yFbgxGe5ZEg6ZGi0TWNs/+gVMHwYKnBIlZLfhZoYD HrSgXt6Diw2oids9AM5/II5bHiDVTVDxGmoOmu04Pt9L/C3tb0ijFaOkJRtQykjA/f13 TA0sfocPm4hYjf2fZiH8jdElQl3FeEHsffFplNI1P+DBgdbWxrFdkFiJ+xafiGxBCT9P acn8dh1/nQY1uIK5LoVhk/V6spfEzva+dz6RWk211A3V0MsR3PiXLcIEKWoY8/tZZIfi VkGQ== X-Gm-Message-State: AOAM530Q6kBV+1+TweanDhv/nL8oB3lisYNoVz9pnH7U5mZXh/dbZ5UV Yts6ItDgfAUkeHty4VwYZsKRnw== X-Google-Smtp-Source: ABdhPJzoJzMzTOrWUHTSBM59ov957MRFKI0xznJNNL/V+RV0TeFnklYK8LnBdQwQR44Vw5xe5iDeGQ== X-Received: by 2002:ac8:70da:: with SMTP id g26mr79736551qtp.67.1594502793190; Sat, 11 Jul 2020 14:26:33 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id y143sm13140146qka.22.2020.07.11.14.26.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jul 2020 14:26:32 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 9DEAC2A2499; Sat, 11 Jul 2020 17:26:30 -0400 (-04) Date: Sat, 11 Jul 2020 17:26:30 -0400 From: Alvaro Herrera To: Tom Lane 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 Message-ID: <20200711212630.GA6825@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2210888.1594477673@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Jul-11, Tom Lane wrote: > 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? No, but you cannot retreat from that ... -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services