pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Antonin Houska <ah@cybertec.at>
To: Arseny Sher <a.sher@postgrespro.ru>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Fix slot's xmin advancement and subxact's lost snapshots in decoding.
Date: Mon, 11 Jun 2018 09:07:47 +0200
Message-ID: <15387.1528700867@localhost> (raw)
In-Reply-To: <87lgdyz1wj.fsf@ars-thinkpad>
References: <87lgdyz1wj.fsf@ars-thinkpad>

Arseny Sher <a.sher@postgrespro.ru> wrote:
> Please see detailed description of the issues, tests which reproduce
> them and fixes in the attached patch.

I've played with your tests and gdb for a while, both w/o and with your
patch. I think I can understand both problems. I could not invent simpler way
to fix them.

One comment about the coding: since you introduce a new transaction list and
it's sorted by LSN, I think you should make the function AssertTXNLsnOrder()
more generic and use it to check the by_base_snapshot_lsn list too. For
example call it after the list insertion and deletion in
ReorderBufferPassBaseSnapshot().

Also I think it makes no harm if you split the diff into two, although both
fixes use the by_base_snapshot_lsn field.

-- 
Antonin Houska
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26, A-2700 Wiener Neustadt
Web: https://www.cybertec-postgresql.com




view thread (13+ messages)  latest in thread

Message-ID: <15387.1528700867@localhost>
Permalink:  ../15387.1528700867@localhost/
Also on:    postgresql.org/message-id/15387.1528700867@localhost

 · 

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-hackers@postgresql.org
  Cc: ah@cybertec.at, a.sher@postgrespro.ru
  Subject: Re: Fix slot's xmin advancement and subxact's lost snapshots in decoding.
  In-Reply-To: <15387.1528700867@localhost>

* 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