Fix a race condition that caused pg_database_size() and pg_tablespace_size()
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Sun, 11 Mar 2007 05:22:00 +0000 (05:22 +0000)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Sun, 11 Mar 2007 05:22:00 +0000 (05:22 +0000)
commit576027bb3f6b9793478914305dbe12270bc31a8b
treecbd4e92097783cfc537bc0a63ab09ce7641c1ffd
parent5acde74e1a2d934d825f1f538de4a4f267b839c1
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

Bug report and patch by Michael Fuhr.
src/backend/utils/adt/dbsize.c