From: | Arseny Sher <a(dot)sher(at)postgrespro(dot)ru> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | 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-10 13:04:46 |
Message-ID: | 87wo8ulhjl.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:
>> I don't believe you can that without persisting additional
>> data. Basically, what we need is list of transactions who are running at
>> the point of snapshot serialization *and* already wrote something before
>> it -- those we hadn't seen in full and can't decode. We have no such
>> data currently. The closest thing we have is xl_running_xacts->nextXid,
>> but
>>
>> 1) issued xid doesn't necessarily means xact actually wrote something,
>> so we can't just skip xl_xact_assignment for xid < nextXid, it might
>> still be decoded
>> 2) snapshot might be serialized not at xl_running_xacts anyway
>>
>> Surely this thing doesn't deserve changing persisted data format.
>>
>
> I agree that it won't be a good idea to change the persisted data
> format, especially in back-branches. I don't see any fix which can
> avoid this without doing major changes in the code. Apart from this,
> we have to come up with a solution for point (3) discussed in the
> above email [1] which again could be change in design. I think we can
> first try to proceed with the patch
> 0002-Stop-demanding-that-top-xact-must-be-seen-before--v2 and then we
> can discuss the other patch. I can't see a way to write a test case
> for this, can you think of any way?
Yeah, let's finally get it.
Attached is raw version of isolation test triggering false
'subtransaction logged without...' (case (1)). However, frankly I don't
see much value in it, so I'm dubious whether it should be included in
the patch.
Attachment | Content-Type | Size |
---|---|---|
subxact_logged_without_top_test.patch | text/x-diff | 1.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2020-02-11 03:59:17 | Re: ERROR: subtransaction logged without previous top-level txn record |
Previous Message | Amit Kapila | 2020-02-10 11:03:31 | Re: ERROR: subtransaction logged without previous top-level txn record |
From | Date | Subject | |
---|---|---|---|
Next Message | Kohei KaiGai | 2020-02-10 13:18:51 | Re: Is custom MemoryContext prohibited? |
Previous Message | Magnus Hagander | 2020-02-10 12:35:29 | Re: pg_basebackup -F plain -R overwrites postgresql.auto.conf |