Re: Fsync (flush) all inserted WAL records - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: Fsync (flush) all inserted WAL records
Date
Msg-id CAJ7c6TMi6GoLX0S4WUXfTg0JfsqRtw9VPa52Asg2mDFaNyRDEQ@mail.gmail.com
Whole thread Raw
In response to Re: Fsync (flush) all inserted WAL records  ("Vitaly Davydov" <v.davydov@postgrespro.ru>)
List pgsql-hackers
Hi,

> I use asynchronous commit (without XLogFlush/fsync at commit). At some moment I would like to XLogFlush (fsync) all
alreadyasynchronously committed transactions (inserted but not flushed/fsynced yet WAL records). Assume, that there is
noany active transactions at this moment, no any potential race conditions. My problem is to find a proper LSN which I
canuse as a parameter for XLogFlush. 

How is it different from `CHECKPOINT;` ?

> Well, I would like to use such function in C language code, in some solution, not as a function to be used by users.

Assuming the function has value, as you claim, I see no reason not to
expose it similarly to pg_current_wal_*(). On top of that you will
have to test-cover it anyway. The easiest way to do it will be to have
an SQL-wrapper.

--
Best regards,
Aleksander Alekseev



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Interrupts vs signals
Next
From: Nathan Bossart
Date:
Subject: Re: Remove dependence on integer wrapping