Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecSvF-0004RE-Um for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Jan 2018 09:25:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecSvF-0007h0-0s for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Jan 2018 09:25:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ecSvE-0007gA-O4 for pgsql-hackers@lists.postgresql.org; Fri, 19 Jan 2018 09:25:16 +0000 Received: from mail-io0-x241.google.com ([2607:f8b0:4001:c06::241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ecSv8-0005ip-Ck for pgsql-hackers@postgresql.org; Fri, 19 Jan 2018 09:25:13 +0000 Received: by mail-io0-x241.google.com with SMTP id c17so1525875iod.1 for ; Fri, 19 Jan 2018 01:25:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=nxyjdAEAX3zX51agjzTyBpWYQ0XuTjfYzxMEEaHIH48=; b=sqeV5LLzNaOdoKpTolV1xoM78dO+W4qxEVAI2CurWn7r0f8qOGFOD6UxU5Z1HA6ojP cJ0a3xlkHjN/pyGBz7eP2pwyUFYOp2hsNKEos8wZmWVX0QLp8PIxCdnpSXlewNqlueDL uLMjpKh6IzzsS2QKfc/5znrpoURxbICSAQUvSUqXBDO9wkJkspiwhr1GyOybnSwaMXkZ cKSdR4JnMLR6wek7b9Szxnm6iE6Hr2f5JTNDllNpCfMbYu87uhFJOkuI11K1NNfwi4eR z0nCQ4OFfsxq8kUvnNkOzI9aanoS/ImfX9RrrGxTgxFlsJo/DG69hOZRWCixLj5FvHfO ll2w== 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:references :mime-version:content-disposition:in-reply-to; bh=nxyjdAEAX3zX51agjzTyBpWYQ0XuTjfYzxMEEaHIH48=; b=qiXt0E4CjHBm1FocrU1IBw2hLFJIOlJwaySH+dcjjon0k86yanVu81UPjtbAeQn5yC cZz3qjMl97vCdr1lujGWX9+VUljSyxQWrTabGs4uiPGQQNpXOtulWpIdy3tlHXO2aZSI 2DIImNMjYrsZIy1G3ec55mV3nDFiearvZ3GQ9PV/A1B4kQW7iuRDH6hMevJJJRru/3ha 5o3DVOTm++Dv8sV04Ql5Ev502AoRXaUBEC43SlGprZ2qI0Vts1FXJU9SgKIEyvvE6vfU Mm+W2HARZjCEN9LP3KGQ+h9z1B1UjJ/hLdUJRomLDZ/wLDD4HqM45gtyo6iF9SegSw89 zBlw== X-Gm-Message-State: AKwxytf8ahxHPsPMMgq3/3WGlLF6l2uXbiRKDwsMSvZmLLKgV7mA0S0k DGOoA5kdhsv30fSoZBhlgaI= X-Google-Smtp-Source: ACJfBovnYQDuZURbchNuAXldmuuJaHXjAW8Agt70Pks62qy0puUBEL2ROj8ejasMameImMUYB+IK/Q== X-Received: by 10.107.17.37 with SMTP id z37mr15431798ioi.282.1516353908435; Fri, 19 Jan 2018 01:25:08 -0800 (PST) Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp. [61.215.137.162]) by smtp.gmail.com with ESMTPSA id h134sm562978ith.32.2018.01.19.01.25.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Jan 2018 01:25:07 -0800 (PST) Date: Fri, 19 Jan 2018 18:24:56 +0900 From: Michael Paquier To: Kyotaro HORIGUCHI Cc: andres@anarazel.de, sfrost@snowman.net, nag1010@gmail.com, jdnelson@dyn.com, pgsql-hackers@postgresql.org Subject: Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)? Message-ID: <20180119092456.GA1169@paquier.xyz> References: <20180117123832.GB2416@tamriel.snowman.net> <20180118115827.GA12826@paquier.xyz> <20180118195252.hyxgkb3krcqjzfjm@alap3.anarazel.de> <20180119.105453.132600443.horiguchi.kyotaro@lab.ntt.co.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IJpNTDwzlM2Ie8A6" Content-Disposition: inline In-Reply-To: <20180119.105453.132600443.horiguchi.kyotaro@lab.ntt.co.jp> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 19, 2018 at 10:54:53AM +0900, Kyotaro HORIGUCHI wrote: > On the other hand if one logical record must be read from single > source, we need any means to deterrent wal-recycling on the > primary side. Conducting that within the primary side is rejected > by consensus. There is this approach of extending the message protocol as well so as the primary can retain the segments it needs to keep around... > (There might be smarter way to do that, though.) To > do that from the standby side, just retarding write feedbacks or > this kind of special feedback would be needed. In any way it is > necessary to introduce WAL-record awareness into WAL shipping > process and it's seemingly large complexity. Coming to logical slots, don't you need to be aware of the beginning of the record on the primary to perform correctly decoding of tuples through time travel? If the record is present across segments, it seems to me that it matters. Andres knows the answer to that for sure, so I would expect to be counter-argued in the next 12 hours or so. -- Michael --IJpNTDwzlM2Ie8A6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlphuWgACgkQnvQgOdby QH1dKg/+N3BzjxMOarPcFUqwqh1l5MXg5XlGY5pQFQ9aoRMLg70iyLMCdl8e+vjL Raa1uhQ5BQGS7HqKwa/S8t5/9r50N+/0zS3C4Gd//ccatk9dxIO7gRX+Z9Yj0ohY JoddmEeBQRHw55sJZcxD0fk3sM2MySDS9+oQytWzZCRAHQMzelSoX2YDdeNYpLfA cvH9Xe6fXT6cfcmYr2YwkzsVtYV5Frv2EidE/2Lrswuh03wx4/mPHv/Ta37aVMMx yzfRNWZlKeXJoqiJ5keGDUrBcoELHpJR+ITAG/wu+FHzrOGRto4tJeiu2vUB4vES xFlMua659P9ptL6UKn5ENPEoAG328sJTP/o6eTpqIKuq9Jmz8BmKZRGFJw0uC7o/ r9OzPMimodQlIGU63cLAu/sY+uDo+aHMsVe/SdMtR17mZ5HeKUr/Md7k81eGZxVl LkotmMMJCEF623uU+CZhnZYHn9nEpEKZLGdUHblAOIZVxVQeY7wZ5SYjGvPrujPv Pln2lpEEU0qhfOK27zkAZmvzwuqwMP6JnMtWKfjFNCaCljgqWSWNoKOmYpnUp3LA sGqycDW2K6LCw4090wBSuwx8BiOHy78HfBJ4dgV4Gk/TfMcPFG6gWcVScumb5fuQ uGDV05fqNSrNRFBMVC4BmrtGXLpH5kY9EVN0zo4zw7cV4vLKhg4= =yKC9 -----END PGP SIGNATURE----- --IJpNTDwzlM2Ie8A6--