Re: Rework LogicalOutputPluginWriterUpdateProgress - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Rework LogicalOutputPluginWriterUpdateProgress
Date
Msg-id 20230303003732.7f3ff4faxxhaag64@alap3.anarazel.de
Whole thread Raw
In response to Re: Rework LogicalOutputPluginWriterUpdateProgress  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers
Hi,

On 2023-03-03 11:18:04 +1100, Peter Smith wrote:
> - Why is reducing members of LogicalDecodingContext even a goal? I
> thought the LogicalDecodingContext is intended to be the one-stop
> place to hold *all* things related to the "Context" (including that
> member that was deleted).

There's not really a reason to keep it in LogicalDecodingContext after
this change. It was only needed there because of the broken
architectural model of calling UpdateProgress from within output
plugins. Why set a field in each wrapper that we don't need?

> - How is reducing one member better than introducing one new parameter
> in multiple calls?

Reducing the member isn't important, needing to set it before each
callback however makes sense.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Normalization of utility queries in pg_stat_statements
Next
From: David Rowley
Date:
Subject: Re: Making empty Bitmapsets always be NULL