Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cpxgh-0006iu-Uq for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Mar 2017 13:49:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cpxgh-0004pL-Hx for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Mar 2017 13:49:31 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cpxfB-0008RE-Eg for pgsql-hackers@postgresql.org; Mon, 20 Mar 2017 13:47:57 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cpxf7-0003Ji-VV for pgsql-hackers@postgresql.org; Mon, 20 Mar 2017 13:47:56 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 424DF21C2650; Mon, 20 Mar 2017 16:47:51 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru Content-Type: text/plain; charset=utf-8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1490017671; bh=HZM/Cwz12ofd/xZsQTw8r2z8bCWJEmjR+UCyw4f104o=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=hkRxnrfCUSa15/b82OJogbHXCiQIA/2memxUTA8Epn+/4c3KS9M73t+B6PpDq/sDU 6wVXegLKuyRQpcpGFntLFc7pIwwNn4VBrF5TuFrZEL1L+wzhvIq5kApzgRw3dIOaCQ ozyqTlfj50Uq5N9DLNjm2Jcsjc3w7ZQdMmz4xlZU= Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: logical decoding of two-phase transactions From: Stas Kelvich In-Reply-To: Date: Mon, 20 Mar 2017 16:47:50 +0300 Cc: Petr Jelinek , PostgreSQL Hackers , Robert Haas Content-Transfer-Encoding: quoted-printable Message-Id: References: <02DA5F5E-CECE-4D9C-8B4B-418077E2C010@postgrespro.ru> <89073436-925E-4299-A9AF-88D04E55C231@postgrespro.ru> <3477E635-F590-4432-BD20-C59142B65CD3@postgrespro.ru> <1FE466EA-7058-484D-B0DB-42CD81FA59F0@postgrespro.ru> <46ebc39d-82a0-e59f-2552-2ea8911a64e7@2ndquadrant.com> <25A09FA8-5B0E-447D-97FB-F37F3B0E34E9@postgrespro.ru> <8217d096-3641-8022-09e4-4e625633b278@2ndquadrant.com> To: Craig Ringer X-Mailer: Apple Mail (2.3259) X-Pg-Spam-Score: -2.0 (--) 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 20 Mar 2017, at 16:39, Craig Ringer wrote: >=20 > On 20 March 2017 at 20:57, Stas Kelvich wrote: >>=20 >>> On 20 Mar 2017, at 15:17, Craig Ringer wrote: >>>=20 >>>> I thought about having special field (or reusing one of the existing f= ields) >>>> in snapshot struct to force filtering xmax > snap->xmax or xmin =3D sn= ap->xmin >>>> as Petr suggested. Then this logic can reside in ReorderBufferCommit(). >>>> However this is not solving problem with catcache, so I'm looking into= it right now. >>>=20 >>> OK, so this is only an issue if we have xacts that change the schema >>> of tables and also insert/update/delete to their heaps. Right? >>>=20 >>> So, given that this is CF3 for Pg10, should we take a step back and >>> impose the limitation that we can decode 2PC with schema changes or >>> data row changes, but not both? >>=20 >> Yep, time is tight. I=E2=80=99ll try today/tomorrow to proceed with this= two scan approach. >> If I=E2=80=99ll fail to do that during this time then I=E2=80=99ll just = update this patch to decode >> only non-ddl 2pc transactions as you suggested. >=20 > I wasn't suggesting not decoding them, but giving the plugin the > option of whether to proceed with decoding or not. >=20 > As Simon said, have a pre-decode-prepared callback that lets the > plugin get a lock on the 2pc xact if it wants, or say it doesn't want > to decode it until it commits. >=20 > That'd be useful anyway, so we can filter and only do decoding at > prepare transaction time of xacts the downstream wants to know about > before they commit. Ah, got that. Okay. > --=20 > Craig Ringer http://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Training & Services --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers