From: | Arseny Sher <a(dot)sher(at)postgrespro(dot)ru> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Arseny Sher <a(dot)sher(at)postgrespro(dot)ru>, Andres Freund <andres(at)anarazel(dot)de>, "Hsu\, John" <hsuchen(at)amazon(dot)com>, "pgsql-bugs\(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: ERROR: subtransaction logged without previous top-level txn record |
Date: | 2020-02-11 12:06:02 |
Message-ID: | 87tv3x72hh.fsf@ars-thinkpad |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> writes:
>> That's weird, it reliably fails with expected error for me. There are
>> already two s2_checkpoint's: first establishes potential (broken)
>> restart_lsn (serializes snapshot after first xl_xact_assignment of s0
>> xact, but before first record of s1 xact), the second ensures
>> s2_get_changes directly following it will actually advance the slot,
>>
>
> In my case, s2_get_changes doesn't seem to be advancing the restart
> lsn because when it processed running_xact by s2_checkpoint, the slots
> confirm flush location (slot->data.confirmed_flush) was behind it. As
> confirmed_flush was behind running_xact of s2_checkpoint, it couldn't
> update slot->candidate_restart_lsn (in function
> LogicalIncreaseRestartDecodingForSlot). I think the confirmed_flush
> location will only be updated at the end of get_changes. This is the
> reason I need extra get_changes call to generate an error.
>
> I will think and investigate this more, but thought of sharing the
> current situation with you. There is something different going on in
> my system or maybe the nature of test is like that.
Ah, I think I know what's happening -- you have one more
xl_running_xacts which catches the advancement -- similar issue is
explained in the comment in oldest_xmin.spec.
Try attached.
Attachment | Content-Type | Size |
---|---|---|
0002-Stop-demanding-that-top-xact-must-be-seen-before--v4.patch | text/x-diff | 7.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2020-02-11 12:34:28 | BUG #16254: SQL raises error dsa_allocate could not find 4 free pages |
Previous Message | Amit Kapila | 2020-02-11 11:45:25 | Re: ERROR: subtransaction logged without previous top-level txn record |
From | Date | Subject | |
---|---|---|---|
Next Message | Andy Fan | 2020-02-11 12:14:14 | Re: [PATCH] Erase the distinctClause if the result is unique by definition |
Previous Message | Amit Kapila | 2020-02-11 11:45:25 | Re: ERROR: subtransaction logged without previous top-level txn record |