> In the SEQUENCE example above, SELECT ... FOR UPDATE is certainly not > adequate to protect the sequence against DDL-level changes. Fortunately > sequences don't have too many DDL commands, but still an ALTER RENAME > might be enough to confuse pg_dump. > > (By the way, does that SELECT ... FOR UPDATE actually accomplish > anything at all? nextval() doesn't go through heap_update, and neither > does ALTER SEQUENCE, so I'd be a bit surprised if it really manages to > block changes to the sequence.)
Of course "SELECT ... FOR UPDATE" does not block nextval(). It just blocks concurrent "SELECT ... FOR UPDATE" in other session. This is enough for pgpool's use case. -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese: http://www.sraoss.co.jp -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers