

Hello all,

Can anyone point me to where in the code does Postgres Flush all the
Data to disk???
When XLogFlush is called, it only flushes the XLOG to disk, right? Does
the entire Data get flushed at the same time as the Log? 

Thanks,

Diego

Sun, 28 Mar 2004 12:30:43 -0500
Diego Montenegro <diego.montenegro@yale.edu>
Flush to Disk
Diego Montenegro wrote:

>Hello all,
>
>Can anyone point me to where in the code does Postgres Flush all the
>Data to disk???
>When XLogFlush is called, it only flushes the XLOG to disk, right? Does
>the entire Data get flushed at the same time as the Log? 
>  
>
in src/backend/storage/smgr/md.c, mdsync(): During a checkpoint, the 
whole system cache is synced to the disk.
Note that checkpoints should be rare - I think every few minutes. The 
xlog contains enough data to recover a transaction after a system crash, 
therefore only the xlog is forced to the disk during transaction commit.

--
    Manfred


Sun, 28 Mar 2004 20:21:11 +0200
Manfred Spraul <manfred@colorfullife.com>
Re: Flush to Disk