Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d53hV-00047H-Nc for pgsql-hackers@arkaria.postgresql.org; Mon, 01 May 2017 05:16:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d53hV-0006Ik-6w for pgsql-hackers@arkaria.postgresql.org; Mon, 01 May 2017 05:16:45 +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 1d53hU-0006HZ-30 for pgsql-hackers@postgresql.org; Mon, 01 May 2017 05:16:44 +0000 Received: from mail-wr0-x22a.google.com ([2a00:1450:400c:c0c::22a]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d53hQ-0001YY-DZ for pgsql-hackers@postgresql.org; Mon, 01 May 2017 05:16:43 +0000 Received: by mail-wr0-x22a.google.com with SMTP id w50so59684546wrc.0 for ; Sun, 30 Apr 2017 22:16:40 -0700 (PDT) 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=GOhgSxm5WhWJSbxG/6sLq3iD0NVfx9HSvNHJDFRpjy0=; b=o3pRxBkB+XldbvHN51QSdhjeXO/viyNPb5aVN585RqPXAIi7HCA+N8NaviQgn3NJYW P5VozLxNXEpNXxq0ALqxjBAxhFm3LBRLEfzJjidfzYdFBLZhGd58mXaBb7o68PC917+x 8lVpnkirMTqx6euhgvDyd7A9W4mgwEx9XrHURM6dNOcXOAbiqBQBogZAMnx5MvOl8LNL BtDqKqaVAgJRCGBMy+zVrL/fpcSSuGB2i6kyVUOEzzUs4Afnt4PvW8KtZsfTkpiDzYOT yLBEftMgATRxR48sZU9nGl2OPaR6FHSkQswuFjKm3zgosgQO7bSjJe663oFaPaTiIyU3 V+Cg== 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=GOhgSxm5WhWJSbxG/6sLq3iD0NVfx9HSvNHJDFRpjy0=; b=g5xktsdSp4yXx1FDBso668v/UECerviXRUe2z7zDCmtzYf8ULf8/JuGciZE0erk7Cw xjEfFIAlnvRv05OrpruBqNGAlkrAjTXh6WEMZhfIUVqCEuf0uE3GeFJ5DK0Nwh0/qjcN 3O9bxOtawkamZUmToltnMHM6iZsZXku6zvOV6etV8X/XFO6YzUhXD7cFe9c1ywLITkll +PE1HXHkJ1dpkyaSptNrMqi9z0pVrNEtjHW087Ux9ZpRPYaKZO8jpAYOETxL9TfvHiNb quLPdffeGfrUdTvj54F0sEpQ0iHMxRk4O5+NS19IBHEM42nG4B7BJUQsp9u05lrCtVhX Enrg== X-Gm-Message-State: AN3rC/6YD/3pIMWp4ke8dAaBakGaBB5bzPFAeTkl0Y1cGlPMY66B4eih 8JDgKZsTMWx858II X-Received: by 10.223.164.65 with SMTP id e1mr14135812wra.21.1493615798821; Sun, 30 Apr 2017 22:16:38 -0700 (PDT) Received: from [192.168.0.105] (150.123.broadband11.iol.cz. [90.178.123.150]) by smtp.gmail.com with ESMTPSA id t2sm15250713wme.16.2017.04.30.22.16.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Apr 2017 22:16:37 -0700 (PDT) Subject: Re: snapbuild woes To: Craig Ringer References: <20161212223338.bmhswrdaipttvcve@alap3.anarazel.de> <7023017e-8b08-eaba-396c-80baf0a793c0@2ndquadrant.com> <7286ebe9-cb1b-cf1a-f85b-fbe3402ea0bf@2ndquadrant.com> <9a897b86-46e1-9915-ee4c-da02e4ff6a95@2ndquadrant.com> <51f65289-54f8-2256-d107-937d662d69f1@2ndquadrant.com> <20170413002959.apytyi5lkknauauj@alap3.anarazel.de> <0d06dfc1-0bc5-c3ab-3555-24e2f275d7fa@2ndquadrant.com> <30242bc6-eca4-b7bb-670e-8d0458753a8c@2ndquadrant.com> <20170501005921.qcqd7w2njpv3av6s@alap3.anarazel.de> <20170501013529.sejtgo2acxbvq26q@alap3.anarazel.de> <209861fc-718f-0a7b-3a1d-36512865c209@2ndquadrant.com> Cc: Andres Freund , PostgreSQL-development , Erik Rijkers , Robert Haas From: Petr Jelinek Message-ID: <6ad87d3c-020b-df2b-5046-65bff666caad@2ndquadrant.com> Date: Mon, 1 May 2017 07:16:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 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 01/05/17 04:29, Craig Ringer wrote: > On 1 May 2017 at 09:54, Petr Jelinek wrote: > >> But, I still think we need to restart the tracking after new >> xl_running_xacts. Reason for that is afaics any of the catalog snapshots >> that we assigned to transactions at the end of SnapBuildCommitTxn might >> be corrupted otherwise as they were built before we knew one of the >> supposedly running txes was actually already committed and that >> transaction might have done catalog changes. > > Due to the race where LogStandbySnapshot() collects running-xacts info > while a concurrent xact commits, such that the xl_xact_commit appears > before the xl_running_xacts, but the xl_running_xacts still has the > commited xact listed as running, right? Because we update PGXACT only > after we write the commit to WAL, so there's a window where an xact is > committed in WAL but not shown as committed in shmem. > Yes that's what the patch at hand tries to fix, but Andres approached it from too simplistic standpoint as we don't only care about the exported snapshot but whatever catalog snapshots we made for the transactions we already track, unless I am missing something. -- 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