Re: Report bytes and transactions actually sent downtream
| От | Bertrand Drouvot |
|---|---|
| Тема | Re: Report bytes and transactions actually sent downtream |
| Дата | |
| Msg-id | aUJs5w787EjKlBfv@ip-10-97-1-34.eu-west-3.compute.internal обсуждение исходный текст |
| Ответ на | Re: Report bytes and transactions actually sent downtream (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>) |
| Ответы |
Re: Report bytes and transactions actually sent downtream
|
| Список | pgsql-hackers |
Hi,
On Thu, Dec 11, 2025 at 10:29:42AM +0530, Ashutosh Bapat wrote:
> Sorry for the delayed response. PFA the patch implementing the idea
> discussed above. It relies on the output plugin callback to return
> correct boolean but maintains the statistics in the core itself.
Thanks for the new patch version!
What worries me is all those API changes:
-typedef void (*LogicalDecodeChangeCB) (struct LogicalDecodingContext *ctx,
+typedef bool (*LogicalDecodeChangeCB) (struct LogicalDecodingContext *ctx,
Those changes will break existing third party logical decoding plugin, even ones
that don't want the new statistics features.
What about not changing those and just add a single new optional callback, say?
typedef void (*LogicalDecodeReportStatsCB)(
LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
bool *transaction_sent,
size_t *bytes_filtered
);
This way:
- Existing plugins can still work without modification
- New or existing plugins can choose to provide statistics
Thoughts?
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления: