RE: Rework LogicalOutputPluginWriterUpdateProgress - Mailing list pgsql-hackers

From wangw.fnst@fujitsu.com
Subject RE: Rework LogicalOutputPluginWriterUpdateProgress
Date
Msg-id OS3PR01MB6275482D88E78CC90D77D38B9EB69@OS3PR01MB6275.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Rework LogicalOutputPluginWriterUpdateProgress  (Peter Smith <smithpb2250@gmail.com>)
Responses RE: Rework LogicalOutputPluginWriterUpdateProgress
List pgsql-hackers
On Fri, Mar 3, 2023 8:18 AM Peter Smith <smithpb2250@gmail.com> wrote:
> 

Thanks for your comments.

> 1.
> +
> +static void UpdateProgressAndKeepalive(LogicalDecodingContext *ctx,
> +    bool finished_xact);
> +
> +static bool is_keepalive_threshold_exceeded(LogicalDecodingContext *ctx);
> 
> 1a.
> There is an unnecessary extra blank line above the UpdateProgressAndKeepalive.

Removed.

> ~
> 
> 1b.
> I did not recognize a reason for the different naming conventions.
> Here are two new functions but one is CamelCase and one is snake_case.
> What are the rules to decide the naming?

I used the snake_case style for the function UpdateProgressAndKeepalive in the
previous version, but it was confusing because it shared the same parameter name
with the functions StartupDecodingContext, CreateInitDecodingContext and
CreateDecodingContext. To avoid this confusion, and since both naming styles
exist in this file, I changed it to CamelCase style.

Attach the new patch.

Regards,
Wang wei

Attachment

pgsql-hackers by date:

Previous
From: "wangw.fnst@fujitsu.com"
Date:
Subject: RE: Support logical replication of DDLs
Next
From: Amit Kapila
Date:
Subject: Re: Deduplicate logicalrep_read_tuple()