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 the bugs in selecting the transaction for streaming.
Date: Fri, 30 Apr 2021 05:30:16 +0000
Message-ID: <E1lcLjE-0003Z2-NN@gemulon.postgresql.org> (raw)

Fix the bugs in selecting the transaction for streaming.

There were two problems:
a. We were always selecting the next available txn instead of selecting it
when it is larger than the previous transaction.
b. We were selecting the transactions which haven't made any changes to
the database (base snapshot is not set). Later it was hitting an Assert
because we don't decode such transactions and the changes in txn remain as
it is. It is better not to choose such transactions for streaming in the
first place.

Reported-by: Haiying Tang
Author: Dilip Kumar
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/OS0PR01MB61133B94E63177040F7ECDA1FB429@OS0PR01MB6113.jpnprd01.prod.outlook.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ee4ba01dbbc31daa083f434ecd603a80bbe50501

Modified Files
--------------
src/backend/replication/logical/reorderbuffer.c | 38 +++++++++++++++----------
1 file changed, 23 insertions(+), 15 deletions(-)



Message-ID: <E1lcLjE-0003Z2-NN@gemulon.postgresql.org>
Permalink:  ../E1lcLjE-0003Z2-NN@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lcLjE-0003Z2-NN@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 the bugs in selecting the transaction for streaming.
  In-Reply-To: <E1lcLjE-0003Z2-NN@gemulon.postgresql.org>
  References: <E1lcLjE-0003Z2-NN@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