pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove incorrect assertion in reorderbuffer.c.
Date: Fri, 04 Dec 2020 08:33:10 +0000
Message-ID: <E1kl6Wc-0000QT-Id@gemulon.postgresql.org> (raw)

Remove incorrect assertion in reorderbuffer.c.

We start recording changes in ReorderBufferTXN even before we reach
SNAPBUILD_CONSISTENT state so that if the commit is encountered after
reaching that we should be able to send the changes of the entire transaction.
Now, while recording changes if the reorder buffer memory has exceeded
logical_decoding_work_mem then we can start streaming if it is allowed and
we haven't yet streamed that data. However, we must not allow streaming to
start unless the snapshot has reached SNAPBUILD_CONSISTENT state.

In passing, improve the comments atop ReorderBufferResetTXN to mention the
case when we need to continue streaming after getting an error.

Author: Amit Kapila
Reviewed-by: Dilip Kumar
Discussion: https://postgr.es/m/CAA4eK1KoOH0byboyYY40NBcC7Fe812trwTa+WY3jQF7WQWZbQg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8ae4ef4fb0e0331f02c4615182600546c8e5c4d4

Modified Files
--------------
src/backend/replication/logical/reorderbuffer.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)



Message-ID: <E1kl6Wc-0000QT-Id@gemulon.postgresql.org>
Permalink:  ../E1kl6Wc-0000QT-Id@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kl6Wc-0000QT-Id@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: akapila@postgresql.org
  Subject: Re: pgsql: Remove incorrect assertion in reorderbuffer.c.
  In-Reply-To: <E1kl6Wc-0000QT-Id@gemulon.postgresql.org>
  References: <E1kl6Wc-0000QT-Id@gemulon.postgresql.org>

* 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