Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgVjT-0003ne-V3 for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Feb 2017 12:09:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cgVjT-0003Rw-C0 for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Feb 2017 12:09:19 +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 1cgVi3-0001pG-FT for pgsql-hackers@postgresql.org; Wed, 22 Feb 2017 12:07:51 +0000 Received: from mail-wr0-x22c.google.com ([2a00:1450:400c:c0c::22c]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cgVi0-0000oh-QG for pgsql-hackers@postgresql.org; Wed, 22 Feb 2017 12:07:50 +0000 Received: by mail-wr0-x22c.google.com with SMTP id s27so414131wrb.2 for ; Wed, 22 Feb 2017 04:07:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=Hw1GLc19HgFQGRlesT5K9w42wBKzOTvlixFVsOaKYEs=; b=FUwgBU1YFmNcj6mEtZUYv24q4Z4LzY+5ee84yBof1CSdbHkCMzaaetU7AhWW/2SyBU 7Vpkiyf7IMcPwfFwiwN3o/OFPqLtCjH+iv1pIWf/hlj/VacgAvEWU75cDZTj4Mga16TT L+7R0yK2jjS6ZURM2de7iOvdRatEWl8ljMnMGdlnbzyul4CiKsufXyDa976rPIcJRe9P aFLHuSv6H+rZaxx7Mqo/JonWQLEl+Xu7w7M4MezM+weA81HTpbqDQiH8mjHNvf7CcmqK fPgqwXvflzpKHQd67U3BsXL+hgwuR0t5OVpvpncxYbv+4LRtMTqwbgCRcssAvp+HH1ps aBww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=Hw1GLc19HgFQGRlesT5K9w42wBKzOTvlixFVsOaKYEs=; b=Ub3EYVJs89iEtqfxJ1519cZ6doIWRfvFvCViT9VEjcQv+U4Sbc+O8pG0tFNvExqKrb hEnzAOpKvFo6wEgibSKMym4gs4Avrd8zs9aFzJlKrXfNK3v27bQcDc3i+HYzwT35q52e TCGZzQNy/bOvPnldWsDoojeXhUDKuNvN709y01sUWeMMtvjxLZiBl+IHMxCHKin/oLIr 32k+yF5TEdmS2nSvd6F1JhdGdLS+SdUf1YQJ3S3eHUouijZUz4zAdtX0sHNGfzlDkU7u +Wjmpkpnjx0lkziUsTZ1+9lIeYwsgoz1GzJdblIVPtwREfk5wdfk5AeIi3vcrfJ8PL/j HFGw== X-Gm-Message-State: AMke39nLfxDc86SqpBbxsNjrtdfAyGcBoWqsQm7Q0VeEa+Tkgto2QfQKCVVEih15fANtKkEq X-Received: by 10.223.150.178 with SMTP id u47mr21015158wrb.200.1487765267855; Wed, 22 Feb 2017 04:07:47 -0800 (PST) Received: from [192.168.0.105] (150.123.broadband11.iol.cz. [90.178.123.150]) by smtp.gmail.com with ESMTPSA id 96sm1520181wrb.14.2017.02.22.04.07.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Feb 2017 04:07:46 -0800 (PST) Subject: Re: snapbuild woes To: Erik Rijkers References: <20161212214227.qxspxdqqrprfvnz3@alap3.anarazel.de> <194608bf-d403-b566-3578-4439e70a8119@2ndquadrant.com> <20161212223338.bmhswrdaipttvcve@alap3.anarazel.de> <7023017e-8b08-eaba-396c-80baf0a793c0@2ndquadrant.com> <7286ebe9-cb1b-cf1a-f85b-fbe3402ea0bf@2ndquadrant.com> <5094adef5a2c1cc3f56c18a0252176dd@xs4all.nl> Cc: Andres Freund , PostgreSQL-development , Robert Haas , Craig Ringer From: Petr Jelinek Message-ID: Date: Wed, 22 Feb 2017 13:07:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <5094adef5a2c1cc3f56c18a0252176dd@xs4all.nl> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 22/02/17 11:29, Erik Rijkers wrote: > On 2017-02-22 03:05, Petr Jelinek wrote: >> >> So to summarize attached patches: >> 0001 - Fixes performance issue where we build tons of snapshots that we >> don't need which kills CPU. >> >> 0002 - Disables the use of ondisk historical snapshots for initial >> consistent snapshot export as it may result in corrupt data. This >> definitely needs backport. >> >> 0003 - Fixes bug where we might never reach snapshot on busy server due >> to race condition in xl_running_xacts logging. The original use of extra >> locking does not seem to be enough in practice. Once we have agreed fix >> for this it's probably worth backpatching. There are still some comments >> that need updating, this is more of a PoC. >> > > I am not not entirely sure what to expect. Should a server with these 3 > patches do initial data copy or not? The sgml seems to imply there is > not inital data copy. But my test does copy something. > Not by itself (without the copy patch), those fixes are for snapshots. > > With >> 0001-Skip-unnecessary-snapshot-builds.patch >> 0002-Don-t-use-on-disk-snapshots-for-snapshot-export-in-l.patch >> 0003-Fix-xl_running_xacts-usage-in-snapshot-builder.patch > > the consistent (but wrong) end state is always that only one of the four > pgbench tables, pgbench_history, is replicated (always correctly). > > Below is the output from the test (I've edited the lines for email) > (below, a,b,t,h stand for: pgbench_accounts, pgbench_branches, > pgbench_tellers, pgbench_history) > (master on port 6972, replica on port 6973.) > > port > 6972 a,b,t,h: 100000 1 10 347 > 6973 a,b,t,h: 0 0 0 347 > > a,b,t,h: a68efc81a 2c27f7ba5 128590a57 1e4070879 master > a,b,t,h: d41d8cd98 d41d8cd98 d41d8cd98 1e4070879 replica NOK > > The md5-initstrings are from a md5 of the whole content of each table > (an ordered select *) > > I repeated this a few times: of course, the number of rows in > pgbench_history varies a bit but otherwise it is always the same: 3 > empty replica tables, pgbench_history replicated correctly. > That's actually correct behaviour without the initial copy patch, it replicates changes, but since the 3 tables only get updates there is nothing to replicate as there is no data downstream. However inserts will of course work fine even without data downstream. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers