Re: GetStandbyFlushRecPtr() : OUT param is not optional like elsewhere. - Mailing list pgsql-hackers

From Amul Sul
Subject Re: GetStandbyFlushRecPtr() : OUT param is not optional like elsewhere.
Date
Msg-id CAAJ_b97+2RYTFJFnaL3tAQFEM8fftfNXpL8fakmiK7CXthgyGQ@mail.gmail.com
Whole thread Raw
In response to Re: GetStandbyFlushRecPtr() : OUT param is not optional like elsewhere.  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
Thanks Aleksander and Álvaro for your inputs.

I understand this change is not making any improvement to the current
code. I was a bit concerned regarding the design and consistency of
the function that exists for the server in recovery and for the server
that is not in recovery.  I was trying to write following snippet
where I am interested only for XLogRecPtr:

recPtr = RecoveryInProgress() ? GetStandbyFlushRecPtr(NULL) :
GetFlushRecPtr(NULL);

But I can't write this since I have to pass an argument for
GetStandbyFlushRecPtr() but that is not compulsory for
GetFlushRecPtr().

I agree to reject proposed changes since that is not useful
immediately and have no rule for the optional argument for the
similar-looking function.

Regards,
Amul



pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: Custom tuplesorts for extensions
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Use "WAL segment" instead of "log segment" consistently in user-facing messages