Re: Remove an unused function GetWalRcvWriteRecPtr - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Remove an unused function GetWalRcvWriteRecPtr
Date
Msg-id Yj6qHS66HVlr5+v5@paquier.xyz
Whole thread Raw
In response to Remove an unused function GetWalRcvWriteRecPtr  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Remove an unused function GetWalRcvWriteRecPtr  (Julien Rouhaud <rjuju123@gmail.com>)
List pgsql-hackers
On Sat, Mar 26, 2022 at 10:51:15AM +0530, Bharath Rupireddy wrote:
> The function GetWalRcvWriteRecPtr isn't being used anywhere, however
> pg_atomic_read_u64(&walrcv->writtenUpto); (reading writtenUpto without
> spinlock) is being used directly in pg_stat_get_wal_receiver
> walreceiver.c. We either make use of the function instead of
> pg_atomic_read_u64(&walrcv->writtenUpto); or remove it. Since there's
> only one function using walrcv->writtenUpto right now, I prefer to
> remove the function to save some LOC (13).
>
> Attaching patch. Thoughts?

This could be used by some external module, no?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Accommodate startup process in a separate ProcState array slot instead of in MaxBackends slots.
Next
From: Bharath Rupireddy
Date:
Subject: Re: Use "WAL segment" instead of "log segment" consistently in user-facing messages