Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffnuJ-0007af-4l for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Jul 2018 14:58:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ffnuH-0003WZ-DK for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Jul 2018 14:58:21 +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.89) (envelope-from ) id 1ffnuH-0003WS-5o for pgsql-hackers@lists.postgresql.org; Wed, 18 Jul 2018 14:58:21 +0000 Received: from mail-lj1-f193.google.com ([209.85.208.193]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ffnuE-0001T2-GH for pgsql-hackers@postgresql.org; Wed, 18 Jul 2018 14:58:20 +0000 Received: by mail-lj1-f193.google.com with SMTP id v9-v6so4384743ljk.4 for ; Wed, 18 Jul 2018 07:58:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=CQil1rwng6Cwb+h0QyirpUzWfOGlXANX3o08PXS/l0o=; b=WuNErKDMacukC17ZddIzksGxwcLia+79sE7Pw9oomLuFplYOgQvNg2nurQ3xr+SH/2 KClZnQxVGUwQGarnhsS4A5JGi2/WkokmT3CPCfnAXcst4WDunSUAqzCHlcYeD0hLk4o8 auwo88XRA8wBE28QfNFmTBvzABigPYTQlYek45LLvN1cHaccuB3gSw3jDgtDGZXB+MP5 k70eGN3zoantvHOR0pOQh4zUvEM7NrSE3YImMZ4LMQ7J7lYd1LhYbrkWkhr5AaaORYSi s0aJme2wiUAA6E6w8BBdV0G09tBXec9X/rg92VirOYvKJqhU6doz/rf5Ons69K2WIsNY 6g0A== X-Gm-Message-State: AOUpUlEbfABWMN8QoROhcb9n1t63plVYkgpVOFnXZQycQghWxVT/gklF fN5H/YWkg7NoqBYZT+SgUT6hUn4E X-Google-Smtp-Source: AAOMgpdmGg4HDvwvXTHttSO2+iBPsSL7ilj46uRGxA3lUidg03lT6ZuT3lqpMPN4Rz8hDelPAeod4A== X-Received: by 2002:a2e:4186:: with SMTP id d6-v6mr4815230ljf.36.1531925897288; Wed, 18 Jul 2018 07:58:17 -0700 (PDT) Received: from [192.168.1.11] (dsl-hkibng32-54fbf8-78.dhcp.inet.fi. [84.251.248.78]) by smtp.gmail.com with ESMTPSA id z12-v6sm579855lfj.26.2018.07.18.07.58.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jul 2018 07:58:16 -0700 (PDT) Subject: Re: [HACKERS] WAL logging problem in 9.4.3? To: Robert Haas , Michael Paquier Cc: Andrew Dunstan , "pgsql-hackers@postgresql.org" References: <20180704045912.GG1672@paquier.xyz> <20180711033241.GQ1661@paquier.xyz> <08b11907-d0b2-c396-2978-ba5aac1972df@iki.fi> <026AD6A1-3396-47F4-B87E-77E3F139D166@iki.fi> <20180717000129.GA3388@paquier.xyz> <3c1cf991-8846-9a6f-c669-e21f8ea9a6a4@2ndQuadrant.com> <20180718130622.GI8565@paquier.xyz> From: Heikki Linnakangas Message-ID: Date: Wed, 18 Jul 2018 17:58:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: 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 18/07/18 16:29, Robert Haas wrote: > On Wed, Jul 18, 2018 at 9:06 AM, Michael Paquier wrote: >>> What's wrong with the approach proposed in >>> http://postgr.es/m/55AFC302.1060805@iki.fi ? >> >> For back-branches that's very invasive so that seems risky to me >> particularly seeing the low number of complaints on the matter. > > Hmm. I think that if you disable the optimization, you're betting that > people won't mind losing performance in this case in a maintenance > release. If you back-patch Heikki's approach, you're betting that the > committed version doesn't have any bugs that are worse than the status > quo. Personally, I'd rather take the latter bet. Maybe the patch > isn't all there yet, but that seems like something we can work > towards. If we just give up and disable the optimization, we won't > know how many people we ticked off or how badly until after we've done > it. Yeah. I'm not happy about backpatching a big patch like what I proposed, and Kyotaro developed further. But I think it's the least bad option we have, the other options discussed seem even worse. One way to review the patch is to look at what it changes, when wal_level is *not* set to minimal, i.e. what risk or overhead does it pose to users who are not affected by this bug? It seems pretty safe to me. The other aspect is, how confident are we that this actually fixes the bug, with least impact to users using wal_level='minimal'? I think it's the best shot we have so far. All the other proposals either don't fully fix the bug, or hurt performance in some legit cases. I'd suggest that we continue based on the patch that Kyotaro posted at https://www.postgresql.org/message-id/20180330.100646.86008470.horiguchi.kyotaro%40lab.ntt.co.jp. - Heikki