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 1jtJAh-0003km-Oe for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Jul 2020 23:08:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jtJAf-0005ce-95 for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Jul 2020 23:08:09 +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 1jtJAe-0005cW-OT for pgsql-hackers@lists.postgresql.org; Wed, 08 Jul 2020 23:08:08 +0000 Received: from mail-qv1-xf42.google.com ([2607:f8b0:4864:20::f42]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jtJAX-0004CA-P3 for pgsql-hackers@lists.postgresql.org; Wed, 08 Jul 2020 23:08:07 +0000 Received: by mail-qv1-xf42.google.com with SMTP id u8so113160qvj.12 for ; Wed, 08 Jul 2020 16:08:01 -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=35lgilf8sF/ai+G2zAxvvtOVNJdT7t6ad7ryP88/7Ag=; b=PYc9zzbtMy3h1WRN0j+46wyx+etjO4mcSK93uxxOpbjooMtZN8n4KdWTVG1uQZOVKt vPd1kcqxtSCage1bz0LdULihVrK3TJuGOAaV62rZRpeIraT1g4eGVJqzL5n/jSTwS+nU 93sseb7d0ikabo90qgkQ47l2P3/QzaVbNLP6ob0lJ9FeT+dLH1iGVaBel9XraoBXn1su xcCGdxJwNJiTizot6vDLRRtG3KtXXVtxxLag+4YUSJmTJXPGSV09EE8NiQgPwLZ1gfwj Q44fqqbrG7tibDITY9sAMy5VGoF0eAPtThE3BDwn9QAxvsmITua7cobS3mTIU3vxNC/k x8mA== 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=35lgilf8sF/ai+G2zAxvvtOVNJdT7t6ad7ryP88/7Ag=; b=H/pFvIj1ggdMhRRSPNujWlBPKLriUuwJ1UsBXlwIP/vzWTuyxTm4PUB6Rph2hZMqc4 aSIR5JrjgdRixUL8NfMXZe8l3/ufIXMRdvYKRAZkuYUzzqEtwhxLxfMY0QFAS85K3LqP pYqul8ubS7szCJTqxilVe0VwaR3a6P3ruFwsJnAPcN7SSN7OOkRRhAMsu0lP9uh/8iWE +PEmBjaaQwp2IY2SShy4Zg+DX2Ihen4ubP3Q1/Z2CdRQ9gTBa9aoh/yNQLkpT3qY8IuT 99BpTE+CfnCbBcC9zzFmzmmosm1kz6MVfTBPbwPzGN+qTdI6lVwnbrfzxUI9mUZrhN0v jDRQ== X-Gm-Message-State: AOAM532H2RxyMQUiDPcF/9EjDnpRxq/xsq38RockTJ5Fdu7JGfZUy0Lv zanEbpsDiwSpMsQymPijnRBRQQ== X-Google-Smtp-Source: ABdhPJwgUg575a5R08rFkj/uE3ZL8M0BzGMeMpPS0f5ffC9vPj2I3ruF1ZFOxKfprmAlM8do1l1q6g== X-Received: by 2002:a05:6214:1584:: with SMTP id m4mr56315852qvw.60.1594249680821; Wed, 08 Jul 2020 16:08:00 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id d19sm1448699qko.114.2020.07.08.16.07.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2020 16:07:59 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 9DE8B2A18A9; Wed, 8 Jul 2020 19:07:57 -0400 (-04) Date: Wed, 8 Jul 2020 19:07:57 -0400 From: Alvaro Herrera To: Tom Lane Cc: 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: <20200708230757.GA28114@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1724648.1594230917@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-08, Tom Lane wrote: > Alvaro Herrera writes: > > In absence of other suggestions I gave this the name XLogMBVarToSegs, > > and redefined ConvertToXSegs to use that. Didn't touch callers in > > xlog.c to avoid pointless churn. Pushed to both master and 13. > > The buildfarm's sparc64 members seem unhappy with this. Hmm. Some of them are, yeah, but it's not universal. For example mussurana and ibisbill are not showing failures. Anyway the error is pretty strange: only GetWALAvailability is showing a problem, but the size calculation in the view function def is returning a negative number, as expected. So looking at the code in GetWALAvailability, what happens is that targetSeg >= oldestSlotSeg, but we expect the opposite. I'd bet for targetSeg to be correct, since its input is just the slot LSN -- pretty easy. But for oldestSlotSeg, we have KeepLogSeg involved. No immediate ideas ... -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services