Re: LOCK for non-tables
От | Tatsuo Ishii |
---|---|
Тема | Re: LOCK for non-tables |
Дата | |
Msg-id | 20110112.094319.102092897291462396.t-ishii@sraoss.co.jp обсуждение исходный текст |
Ответ на | Re: LOCK for non-tables (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
> 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
В списке pgsql-hackers по дате отправления: