Re: pg_autovacuum causes 'create database' to fail when the - Mailing list pgsql-general

From Bruce Momjian
Subject Re: pg_autovacuum causes 'create database' to fail when the
Date
Msg-id 200311081624.hA8GO6J14116@candle.pha.pa.us
Whole thread Raw
In response to pg_autovacuum causes 'create database' to fail when the first is accessing 'template1'  (Frank van Vugt <ftm.van.vugt@foxi.nl>)
Responses Re: pg_autovacuum causes 'create database' to fail when the
Re: pg_autovacuum causes 'create database' to fail when the first is accessing 'template1'
List pgsql-general
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 by date:

Previous
From: Alex
Date:
Subject: Question on Replication
Next
From: "monu agrawal"
Date:
Subject: performance: time & disk access measurment