From: | Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)nl> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | pg_autovacuum causes 'create database' to fail when the first is accessing 'template1' |
Date: | 2003-11-08 10:08:58 |
Message-ID: | 200311081108.58574.ftm.van.vugt@foxi.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | praveen kumar | 2003-11-08 11:59:51 | Questions from a beginner! |
Previous Message | Rajesh Kumar Mallah | 2003-11-08 09:22:44 | Problem creating ROWTYPE variable in plpgsql. |