On 12/13/2015 08:38 PM, Tomas Vondra wrote:
On 12/13/2015 06:13 AM, Amit Kapila wrote:
Is there a reason why you can't use existing function
GetFlushRecPtr() in xlog.c?
No, not really. I think I somehow missed that function when writing
the initial version of the patch. Will fix in v2 of the patch.
Hmm, so I've been looking at this, and I've realized that I've written
it like this because that's pretty much what pg_current_xlog_location()
does. It calls GetXLogWriteRecPtr which does this:
* Get latest WAL write pointer
LogwrtResult = XLogCtl->LogwrtResult;
so the patch does the same thing, except that I've returned "Flush".
OTOH GetFlushRecPtr does this:
recptr = XLogCtl->LogwrtResult.Flush;
i.e. it does not update LogwrtResult, the local private copy. Not sure
what's appropriate here ...
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: