Re: dropdb lock

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: dropdb lock
Date: 2005-11-19 18:57:47
Message-ID: 21408.1132426667@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> In dbcommands.c::dropdb() there are these lines:

> /* Close pg_database, but keep exclusive lock till commit */
> heap_close(pgdbrel, NoLock);

> However, ISTM that if I return early from that function because the db
> doesn't exist I should release the lock immediately. Or is there
> something I have missed?

Should be OK to drop the lock if you didn't change anything. OTOH, it
probably doesn't matter much since we don't allow dropdb inside a
transaction block; commit is going to happen shortly anyhow.

regards, tom lane

In response to

  • dropdb lock at 2005-11-19 18:15:58 from Andrew Dunstan

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2005-11-19 20:36:54 Re: Materialized views (Was Re: Improving count(*))
Previous Message Andrew Dunstan 2005-11-19 18:15:58 dropdb lock