From: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
---|---|
To: | marko(at)joh(dot)to |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #14279: Logical decoding misses a transaction completely |
Date: | 2016-08-04 19:40:18 |
Message-ID: | 8760rgfhrr.fsf@news-spur.riddles.org.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
>>>>> "marko" == marko <marko(at)joh(dot)to> writes:
marko> The problem seems to be that ReorderBufferCommitChild()
marko> overwrites the main transaction's base_snapshot with a NULL
marko> because it thinks the subtransaction's base_snapshot_lsn=0 is
marko> older than the main transaction's actual snapshot
i.e. here in ReorderBufferCommitChild:
/*
* Pass the our base snapshot to the parent transaction if it doesn't have
* one, or ours is older. That can happen if there are no changes in the
* toplevel transaction but in one of the child transactions. This allows
* the parent to simply use it's base snapshot initially.
*/
if (txn->base_snapshot == NULL ||
txn->base_snapshot_lsn > subtxn->base_snapshot_lsn)
{
it's possible for subtxn to exist, but for subtxn->base_snapshot to be
NULL and base_snapshot_lsn to be 0, and obviously propagating this to
txn is wrong.
--
Andrew (irc:RhodiumToad)
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2016-08-04 20:32:57 | Re: Fwd: [BUGS] BUG #14247: COMMENT is restored on wrong database |
Previous Message | marko | 2016-08-04 19:17:57 | BUG #14279: Logical decoding misses a transaction completely |