Unlogged tables and BufferSync() - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Unlogged tables and BufferSync()
Date
Msg-id 4F06EE73.5040502@enterprisedb.com
Whole thread Raw
Responses Re: Unlogged tables and BufferSync()  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
In BufferSync(), we have this:

>     /*
>      * Unless this is a shutdown checkpoint, we write only permanent, dirty
>      * buffers.  But at shutdown time, we write all dirty buffers.
>      */
>     if (!(flags & CHECKPOINT_IS_SHUTDOWN))
>         flags |= BM_PERMANENT;

That seems bogus to me. We're mixing CHECKPOINT_* flags and buffer BM_* 
flags in the same variable. Furthermore, we only use that flags variable 
to pass it down to CheckpointWriteDelay(), which only pays attention to 
CHECKPOINT_IMMEDIATE flag. The intention was probably to do "mask |= 
BM_PERMANENT" ?

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: FATAL: bogus data in lock file "postmaster.pid": ""
Next
From: Robert Haas
Date:
Subject: Re: Unlogged tables and BufferSync()