Remove an unused function GetWalRcvWriteRecPtr - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject Remove an unused function GetWalRcvWriteRecPtr
Date
Msg-id CALj2ACXghpoFryfk7-=-gdBa9pVMtJ3gokeWisdmD44nGTWw1Q@mail.gmail.com
Whole thread Raw
Responses Re: Remove an unused function GetWalRcvWriteRecPtr  (Michael Paquier <michael@paquier.xyz>)
Re: Remove an unused function GetWalRcvWriteRecPtr  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Hi,

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?

Regards,
Bharath Rupireddy.

Attachment

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: pg_walinspect - a new extension to get raw WAL data and WAL stats
Next
From: Michael Paquier
Date:
Subject: Re: pg_tablespace_location() failure with allow_in_place_tablespaces