Search Postgresql Archives

Re: BufferSync() performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Guido Ostkamp <postgresql@xxxxxxxxxxxxxxxxxxx> writes:
> Would this work or is there a special reason why the original check was 
> done with lock held?

This will fail, very nastily, on multiple-CPU machines with weak memory
ordering guarantees.  You can't assume you are seeing an up-to-date
value of the flag bit if you don't take the spinlock first.

There are places where we can get away with such things because a
slightly stale answer is okay, but not in BufferSync().  Failing to
include a dirty page in the checkpoint is fatal.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux