[PERFORM] pg_dump blocking create database?

2007-09-12 Thread Dan Harris
My PG server came to a screeching halt yesterday.  Looking at top saw a very 
large number of startup waiting tasks.   A pg_dump was running and one of my 
scripts had issued a CREATE DATABASE command.  It looks like the CREATE DATABASE 
was exclusive but was having to wait for the pg_dump to finish, causing a 
massive traffic jam of locks behind it.


Once I killed the pg_dump process, things returned to normal.

Version 8.0.12.  Is this a bug? It also concerns me because my workload is 
likely to expose this problem again.


---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


Re: [PERFORM] pg_dump blocking create database?

2007-09-12 Thread Tom Lane
Dan Harris [EMAIL PROTECTED] writes:
 My PG server came to a screeching halt yesterday.  Looking at top saw a very 
 large number of startup waiting tasks.   A pg_dump was running and one of 
 my 
 scripts had issued a CREATE DATABASE command.  It looks like the CREATE 
 DATABASE 
 was exclusive but was having to wait for the pg_dump to finish, causing a 
 massive traffic jam of locks behind it.

 Once I killed the pg_dump process, things returned to normal.

 Version 8.0.12.  Is this a bug?

It's operating as designed :-(.  8.1 and later use less strict locking
on pg_database during create/drop database.

regards, tom lane

---(end of broadcast)---
TIP 6: explain analyze is your friend