Re: Remove an unused function GetWalRcvWriteRecPtr

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Remove an unused function GetWalRcvWriteRecPtr
Date: 2022-03-26 05:52:29
Message-ID: Yj6qHS66HVlr5+v5@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2022-03-26 05:56:16 Re: Use "WAL segment" instead of "log segment" consistently in user-facing messages
Previous Message Michael Paquier 2022-03-26 05:46:45 Re: BUG #17448: In Windows 10, version 1703 and later, huge_pages doesn't work.