Re: Rethinking locking for database create/drop vs

Поиск
Список
Период
Сортировка
Искать
От
Simon Riggs
Тема
Re: Rethinking locking for database create/drop vs
Дата
в 04:44:24
Msg-id
1146728655.449.222.camel@localhost.localdomain
Ответ на
Список
Дерево обсуждения
Rethinking locking for database create/drop vs connection startup Tom Lane <tgl@sss.pgh.pa.us>
Re: Rethinking locking for database create/drop vs Simon Riggs <simon@2ndquadrant.com>
Re: Rethinking locking for database create/drop vs connection startup Tom Lane <tgl@sss.pgh.pa.us>
Re: Rethinking locking for database create/drop vs connection Christopher Kings-Lynne <chris.kings-lynne@calorieking.com>
On Wed, 2006-05-03 at 16:15 -0400, Tom Lane wrote:
> This is motivated by Jim Buttafuoco's recent gripe about not being
> able to connect while a DROP DATABASE is in progress:
> http://archives.postgresql.org/pgsql-hackers/2006-05/msg00074.php

...

>  If dropdb() takes such a lock before it checks for active
> backends, then the connection sequence can look like this:
> 
> 	1. read pg_database flat file to find out OID of target DB
> 	2. initialize far enough to be able to start a transaction,
> 	   and do so
> 	3. take a shared lock on the target DB by OID
> 	4. re-read pg_database flat file and verify DB still exists

Many people never CREATE or DROP databases. They just do everything in
the default database (name is release dependent) - at least on their
main system(s). It would be valid to optimize for that case.

--  Simon Riggs              EnterpriseDB   http://www.enterprisedb.com


В списке pgsql-hackers по дате отправления
От: Teodor Sigaev
Дата:
Сообщение: Re: Revised R* tree using GiST
От: Simon Riggs
Дата:
Сообщение: Re: Typo in ginxlog.c
FAQ