Re: pg_autovacuum causes 'create database' to fail when the

Поиск
Список
Период
Сортировка
Good description --- not sure what we can do about it.

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

Frank van Vugt wrote:
> Hi,
>
> I noticed that when using the single commandline:
>
> drop database <name>; create database <name>;
>
> this sometimes fails due to a pg_autovacuum process running on the background.
>
>
> When this happens, the error returned is:
>
> db2=# drop database db1; create database db1;
> DROP DATABASE
> ERROR:  source database "template1" is being accessed by other users
>
>
>
> The logs shows that pg_autovacuum kicks in right after the drop database, but
> right before the create database, causing the latter to fail:
>
>
> 2003-11-08 10:50:15 [1422] LOG:  unexpected EOF on client connection
> 2003-11-08 10:50:46 [1424] LOG:  connection received: host=<ip> port=<port>
> 2003-11-08 10:50:46 [1424] LOG:  connection authorized: user=<my_name>
> database=db2
> 2003-11-08 10:50:52 [1424] LOG:  query: drop database db1;
> 2003-11-08 10:50:55 [1426] LOG:  connection received: host=[local] port=
> 2003-11-08 10:50:55 [1426] LOG:  connection authorized:
> user=<pg_autovacuum_user> database=template1
> 2003-11-08 10:50:56 [1424] LOG:  query:  create database db1;
> 2003-11-08 10:50:56 [1424] ERROR:  source database "template1" is being
> accessed by other users
>
>
> Obviously, simply reentering 'create database db1' corrects the problem ;-)
>
>
> db2=# select version();
>                              version
> ------------------------------------------------------------------
>  PostgreSQL 7.4beta3 on i586-pc-linux-gnu, compiled by GCC 2.95.3
> (1 row)
>
>
> pg_autovacuum is started using the options '-D -d2'
>
>
>
>
> This may very well be expected behaviour, but I didn't find anything on it in
> pg_autovacuum's README or TODO, so just in case it is a bug.......
>
>
>
>
> --
> Best,
>
>
>
>
> Frank van Vugt
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

В списке pgsql-general по дате отправления:

Предыдущее
От: Alex
Дата:
Сообщение: Question on Replication
Следующее
От: "monu agrawal"
Дата:
Сообщение: performance: time & disk access measurment