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 1jiknY-000344-07 for pgsql-general@arkaria.postgresql.org; Tue, 09 Jun 2020 20:24:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jiknW-0004Bm-GZ for pgsql-general@arkaria.postgresql.org; Tue, 09 Jun 2020 20:24:38 +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 1jiknV-00049N-Bo for pgsql-general@lists.postgresql.org; Tue, 09 Jun 2020 20:24:38 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jiknR-0007So-9Z for pgsql-general@lists.postgresql.org; Tue, 09 Jun 2020 20:24:36 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id DC0895FE; Tue, 9 Jun 2020 16:24:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 09 Jun 2020 16:24:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=Z s/oMquOaQwdpcGGFpXh5NrurkadWNk5yoBDzEWGk2Q=; b=oQtdn9neH4AWARAjx REIgQ+1tf8oj/3lgoPNFsV+mFxbxFeUnbsrA/NoyqmegH8KFyFR3ZHD9lI3/GNDC 4jcalz8XjfAyJ7qmpV3/wo8HzPC63MjIGwmuUr8pW8I2HNj9/HVfGmrxq5Z2gdn8 LIodEuB3KuJXHq3FQC9uWjQxMZm823xj6Z5xAuYNdgz/HJ6pa+CdNR/uYud6zcI5 0YbNPXXNQDNhcqWGMTSePECdl5dAuFsZKE1MNGSSYO6TayDpKBcy2/2CfAH+g8w9 hmrAKA4W1Nx27JgPSnuynow164jEWWTntag72d1Z8qh1z6SeDhdm7py1zi3AUivI H4k4g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=fm3; bh=Zs/oMquOaQwdpcGGFpXh5NrurkadWNk5yoBDzEWGk 2Q=; b=Lum9y+jWNGCB4aN3WFxIekqfLXb2tvQjIiCx6BwPt3OjPyhG54DCOBvh6 aKjR9LIBSCMSc+pg8hbFFqCUm5doz202IlHVePe8n4SGfo7nDlAbCN0tad9/7GRr Dpcit4EpTmQ7NssWLldm1VYkqPkoslIWTH2M9Ialtfe36pT9EGsOnOUiYkm4BUt/ o2qUuQ08ewuo244UbB3wyMBh+8++eTkQKzqX32ItUCU7gkQXqccEo3Pdw5IHEIY8 IIHWmvr8At9yjBbhDne7B6PegQt8dfOz2Lfow8NbYt69/XlYaPymdjMKr7aKQl2Q ux4bOdnxjRNONCSbW75AQ5WwRJJsQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudehgedgudehudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesth ejredttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeetjedvte ffjeeuvdelieeffeehuedthffgvdfhhffhkedvudevgedvjedufefgveenucfkphepjeeh rddujedvrdehrddvfedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 59928328005A; Tue, 9 Jun 2020 16:24:28 -0400 (EDT) Subject: Re: Something else about Redo Logs disappearing To: Peter , Tom Lane Cc: pgsql-general@lists.postgresql.org References: <20200609000253.GA21670@gate.oper.dinoex.org> <20200609023326.GA61487@gate.oper.dinoex.org> <2191826.1591680440@sss.pgh.pa.us> <20200609190229.GA63168@gate.oper.dinoex.org> From: Adrian Klaver Message-ID: <354bde82-48a9-4fde-0bf6-70605ed2c8c1@aklaver.com> Date: Tue, 9 Jun 2020 13:24:27 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200609190229.GA63168@gate.oper.dinoex.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 6/9/20 12:02 PM, Peter wrote: > On Tue, Jun 09, 2020 at 01:27:20AM -0400, Tom Lane wrote: > ! Adrian Klaver writes: > ! > On 6/8/20 7:33 PM, Peter wrote: > ! >> That "cp" is usually not synchronous. So there is the possibility > ! >> that this command terminates successfully, and reports exitcode zero > ! >> back to the Postgres, and then the Postgres will consider that log > ! >> being safely away. > ! > ! > Which is why just following the above command in the docs is: > ! > "(This is an example, not a recommendation, and might not work on all > ! > platforms.) " > ! > ! Yeah. There have been discussions about changing that disclaimer to be > ! more forceful, because in point of fact a plain "cp" is generally not safe > ! enough. You need to fsync the written file, and on many filesystems you > ! also have to fsync the directory it's in. > > It certainly does not need to be "more forceful" - because this is not > about behavioural education, like training dogs, horses, or monkeys, > and neither do we entertain a BDSM studio. > > What it needs instead is mention of the magic word "fsync". Because, > we already know that - we just need a reminder at the proper place. > > Systems integrators are professional people. They are not in need of > more beating (spell: forceful education), only of substantial > technical hints and informations. > > ! > Generally for peace of mind folks use third party tools like: > ! > ! +1. Rolling your own archive script is seldom advisable. > > Well then, using commercial solutions brings it's own problems. E.g., FYI, the projects Stephen and I mentioned are Open Source. I'm sure you can get paid support for them, but you exist a higher plane then that so you can use then for free. > the people I happened to work for often had problems with torsion, > which happens when the solution gets longer than, say, twenty meters, > and these are walked at high speeds. > > They didn't have a problem with scripting - rather the opposite, they > were happy with it and paid good money for. > > > cheerio, > PMc > -- Adrian Klaver adrian.klaver@aklaver.com