pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Arseny Sher <a.sher@postgrespro.ru>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Arseny Sher <a.sher@postgrespro.ru>
Cc: Andres Freund <andres@anarazel.de>
Cc: Hsu\, John <hsuchen@amazon.com>
Cc: pgsql-bugs\@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: ERROR: subtransaction logged without previous top-level txn record
Date: Tue, 11 Feb 2020 15:06:02 +0300
Message-ID: <87tv3x72hh.fsf@ars-thinkpad> (raw)
In-Reply-To: <CAA4eK1L_i7UDLxC6apa=bt+KxVPyEN0L4r1ig-oiOXksEH3jpQ@mail.gmail.com>
References: <AB5978B2-1772-4FEE-A245-74C91704ECB0@amazon.com>
	<87ftjifoql.fsf@ars-thinkpad>
	<20191024213157.7pm6niybfxgpvmgg@alap3.anarazel.de>
	<87eez1fh48.fsf@ars-thinkpad>
	<CAA4eK1L=MDbmGu5-+BmY7Svc07jr+ZabiH8C_qo3RSc8pgUpDQ@mail.gmail.com>
	<8736bs81sx.fsf@ars-thinkpad>
	<CAA4eK1LdNmrib1jub8b=KvYUrzXW0VT4P3MVPMyiMfMY3K64dA@mail.gmail.com>
	<871rrb942q.fsf@ars-thinkpad>
	<CAA4eK1LYzrZ_+8VhD_N_dsQwjxA9t+AyGKT-Wjnc8S7jCwAcBw@mail.gmail.com>
	<87zhdx76d5.fsf@ars-thinkpad>
	<CAA4eK1Jdh0zab=+D91MkFPbevzyjFCZsMwRsQxJh4F9+m_vCRA@mail.gmail.com>
	<CAA4eK1JnSKkNdgLAHWY+YCE_3Li454So_thyTyNJa_G3hSVscA@mail.gmail.com>
	<8736bjoiax.fsf@ars-thinkpad>
	<CAA4eK1Kcsib6UG7zFPrL-h2fvnByfKWxq8Xvzg=2hxUebYwt=g@mail.gmail.com>
	<87wo8ulhjl.fsf@ars-thinkpad>
	<CAA4eK1+zGWCTsPqpL0fON6xW8BWKp_JtHr72hio3RDLJnv0G-A@mail.gmail.com>
	<87lfp9u4kp.fsf@ars-thinkpad>
	<CAA4eK1L_i7UDLxC6apa=bt+KxVPyEN0L4r1ig-oiOXksEH3jpQ@mail.gmail.com>


Amit Kapila <amit.kapila16@gmail.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.

Attachments:

  [text/x-diff] 0002-Stop-demanding-that-top-xact-must-be-seen-before--v4.patch (0B, ../87tv3x72hh.fsf@ars-thinkpad/2-0002-Stop-demanding-that-top-xact-must-be-seen-before--v4.patch)
  download

view thread (40+ messages)  latest in thread

Message-ID: <87tv3x72hh.fsf@ars-thinkpad>
Permalink:  ../87tv3x72hh.fsf@ars-thinkpad/
Also on:    postgresql.org/message-id/87tv3x72hh.fsf@ars-thinkpad

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: a.sher@postgrespro.ru, amit.kapila16@gmail.com, andres@anarazel.de, hsuchen@amazon.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: ERROR: subtransaction logged without previous top-level txn record
  In-Reply-To: <87tv3x72hh.fsf@ars-thinkpad>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox