Re: Remove an unused function GetWalRcvWriteRecPtr

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Remove an unused function GetWalRcvWriteRecPtr
Дата
Msg-id 20220326172709.cutc72m4xlh77vl4@alap3.anarazel.de
обсуждение исходный текст
Ответ на Remove an unused function GetWalRcvWriteRecPtr  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Remove an unused function GetWalRcvWriteRecPtr  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
Hi,

On 2022-03-26 10:51:15 +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).

-1. I think it's a perfectly reasonable function to have, it doesn't cause
architectural / maintenance issues to have it and there's several plausible
future uses for it (moving fsyncing of received WAL to different process,
optionally allowing logical decoding up to the written LSN, reporting function
for monitoring on the standby itself).

Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Pointer subtraction with a null pointer
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Remove an unused function GetWalRcvWriteRecPtr