Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gi1tY-0003L8-Gw for pgsql-bugs@arkaria.postgresql.org; Fri, 11 Jan 2019 18:51:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gi1tX-0003uL-4h for pgsql-bugs@arkaria.postgresql.org; Fri, 11 Jan 2019 18:51:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gi1tW-0003st-PP for pgsql-bugs@lists.postgresql.org; Fri, 11 Jan 2019 18:51:02 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gi1tU-0005pX-8H for pgsql-bugs@lists.postgresql.org; Fri, 11 Jan 2019 18:51:01 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 253C1237EE; Fri, 11 Jan 2019 13:50:59 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 11 Jan 2019 13:50:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=jle9AfH+FO2NETMSRWOWIQSybSb JHGN6LXlhOFQMbcY=; b=u77go7LICxLTB0h3MKqHC2kiP/UzA/N5xv+9tYlcsO9 IJQcdC1xlltI0+4QYWt3wk0ozgCqZzOXNpQQkO03kncX98/7fKdC2GvsCXytZWOd Md1FG0d8CVLsY6VjL3KauKCp4iQkvuQFgdGiavnImqkTVqhu6MrmK8uTco5wmxjh NgyzGKDUdYmHhQQd8ogZ9ilNCkZe0fRMUy6kSga3Rho8P/MvV7FLSQ2gNnf5lbt9 ZH1fQJ/wEx8IOz+hJaPUukpwOfF6F5I0i1Uv30X74CGyHlaFBxAfwOuU9xv+tbSL pXOQgtz9qil8Fse9/dXgenqlcSKbQYTM5tqL2ZIi1uQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=jle9Af H+FO2NETMSRWOWIQSybSbJHGN6LXlhOFQMbcY=; b=ycgINdNQwcCbpXtVHOxgDH 3EHovvmw0GrEU6u9oUpxRtyxCYWMBMPBK5OzWLkEMYmcsWuKgPTzeLX0/qV29cE+ a2jpND8XSsVb8K/3BV6ctdKCYaju9lqlH5Qea4ldhcWXFmIchbMWdlhq1h5UaGic ot2k3fMl3xo4DSP/yWdFJ9FInT/LjQPvLezIJSK1Hk6XzIJII1gv53E6Qc/LBQfB Yti12ys1bmRIeLV6iz4QSGJyfnRU5otEKoAjNH+9o4573ZIX+1WZ5dKW08RtqHcb GPq028lPvfjE9pSq6GSEHjMASQwo70rMKFTsLNF02vt7K2Lnx3x0D/oeP3NjhLow == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrfeehgdduudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecunecujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpe etnhgurhgvshcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeen ucfkphepleekrddvuddtrddugedtrddujedunecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvgenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id 618F8102DE; Fri, 11 Jan 2019 13:50:58 -0500 (EST) Date: Fri, 11 Jan 2019 10:50:57 -0800 From: Andres Freund To: jeff.janes@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15591: pg_receivewal does not honor replication slots Message-ID: <20190111185057.eufs2slfckkncij5@alap3.anarazel.de> References: <15591-3d988c14166018a6@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15591-3d988c14166018a6@postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-01-11 16:52:42 +0000, PG Bug reporting form wrote: > The following bug has been logged on the website: > > Bug reference: 15591 > Logged by: Jeff Janes > Email address: jeff.janes@gmail.com > PostgreSQL version: 11.1 > Operating system: all > Description: > > When you invoke pg_receivewal using --slot to give it the name of an > existing slot which has WAL reserved, and -D pointing to an empty directory, > it fast-forwards the slot's LSN reservation to the beginning of the most > recent WAL file on the server, and starts streaming from there. Rather than > streaming from the LSN reservation point. I don't think there's a bug here. A slot just reserves WAL on the primary, it's not a marker of how much data the standby actually has. It'd be a pretty unsuitable place to store the point up to where the standby has received data, because it's necessarily going to lag behind that. The slot's LSN is the most pessimistic assumption about what's needed, whereas the receiving side should have accurate knowledge. > Does this not utterly destroy the main point of using slots? If I didn't > want to ensure a gapless WAL stream, why use slots in the first place? So the upstream server doesn't drop WAL that a standby (or something like that) still needs? It's pretty rare to randomly start to stream to a differnt place. Greetings, Andres Freund