Fix race condition in size functions

Started by Michael Fuhrover 19 years ago2 messagespatches
Jump to latest
#1Michael Fuhr
mike@fuhr.org

Fix a race condition that caused pg_database_size() and pg_tablespace_size()
to fail if an object was removed between calls to ReadDir() and stat().
Per discussion in pgsql-hackers.

http://archives.postgresql.org/pgsql-hackers/2007-03/msg00671.php

--
Michael Fuhr

Attachments:

dbsize.patchtext/x-diff; charset=us-asciiDownload+23-23
#2Bruce Momjian
bruce@momjian.us
In reply to: Michael Fuhr (#1)
Re: Fix race condition in size functions

Patch applied by Alvaro.

---------------------------------------------------------------------------

Michael Fuhr wrote:

Fix a race condition that caused pg_database_size() and pg_tablespace_size()
to fail if an object was removed between calls to ReadDir() and stat().
Per discussion in pgsql-hackers.

http://archives.postgresql.org/pgsql-hackers/2007-03/msg00671.php

--
Michael Fuhr

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +