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: Fix 'skip-empty-xacts' option in test_decoding for streaming mod
Date: Tue, 17 Nov 2020 06:45:24 +0000
Message-ID: <E1keuk0-0001UN-Cc@gemulon.postgresql.org> (raw)

Fix 'skip-empty-xacts' option in test_decoding for streaming mode.

In streaming mode, the transaction can be decoded in multiple streams and
those streams can be interleaved with streams of other transactions. So,
we can't remember the transaction's write status in the logical decoding
context because that might get changed due to some other transactions and
lead to wrong answers for 'skip-empty-xacts' option. We decided to keep
each transaction's write status in the ReorderBufferTxn to avoid
interleaved streams changing the status of some unrelated transactions.

Diagnosed-by: Amit Kapila
Author: Dilip Kumar
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/CAA4eK1LR7=XNM_TLmpZMFuV8ZQpoxkem--NZJYf8YXmesbvwLA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9653f24ad8307f393de51e0a64d9b10a49efa6e3

Modified Files
--------------
.../test_decoding/expected/concurrent_stream.out   |  5 +-
contrib/test_decoding/specs/concurrent_stream.spec | 10 ++-
contrib/test_decoding/test_decoding.c              | 93 ++++++++++++++++++----
src/backend/replication/logical/reorderbuffer.c    |  1 +
src/include/replication/reorderbuffer.h            |  5 ++
src/tools/pgindent/typedefs.list                   |  1 +
6 files changed, 96 insertions(+), 19 deletions(-)



Message-ID: <E1keuk0-0001UN-Cc@gemulon.postgresql.org>
Permalink:  ../E1keuk0-0001UN-Cc@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1keuk0-0001UN-Cc@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: Fix 'skip-empty-xacts' option in test_decoding for streaming mod
  In-Reply-To: <E1keuk0-0001UN-Cc@gemulon.postgresql.org>
  References: <E1keuk0-0001UN-Cc@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