Re: Move global variables of pgoutput to plugin private scope.

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Move global variables of pgoutput to plugin private scope.
Date: 2023-09-27 07:57:06
Message-ID: ZRPgUl--ET838JAq@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 27, 2023 at 10:51:52AM +0530, Amit Kapila wrote:
> I have briefly looked at
> v2-0002-Move-in_streaming-to-output-private-data in the same email [1]
> but didn't think about it in detail (like whether there is any live
> bug that can be fixed or is just an improvement).

This looks like an improvement to me, as at the startup of a stream
the flag is forcibly reset to a false state. So, you cannot really
reach a state where a second stream could be started within the same
session but with a flag incorrectly set to true. Tracking that in the
state data of pgoutput is cleaner, definitely.

> If you wanted to
> look and commit v2-0002-Move-in_streaming-to-output-private-data, I am
> fine with that?

Sure. I found the concept behind 0002 sound. Feel free to go ahead
with 0001, and I can always look at the second. Always happy to help.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2023-09-27 08:03:43 Re: make add_paths_to_append_rel aware of startup cost
Previous Message David Rowley 2023-09-27 07:35:04 Re: Avoid a possible out-of-bounds access (src/backend/optimizer/util/relnode.c)