Thread: How to remove VACUUM lock?

How to remove VACUUM lock?

From
Philip Bierhoff
Date:
Hi guyz,

Because of some strange reason my VACUUM command resulted in a complete
halt of the database PostgreSQL 6.3 on Linux 2.0.18 (already a simple
select * resulted in a halt). I had to manually close the postmaster and
all the locked backends before I could access my database again.

Now the select * query works again, but issuing "vacuum" gives:

Welcome to the POSTGRESQL interactive sql monitor:
  Please read the file COPYRIGHT for copyright terms of POSTGRESQL

   type \? for help on slash commands
   type \q to quit
   type \g or terminate with semicolon to execute query
   You are currently connected to the database: komal

komal=> vacuum;
ERROR:  can't create lock file -- another vacuum cleaner running?
komal=> vacuum;
NOTICE:  CreatePortal: portal <vacuum> already exists
ERROR:  can't create lock file -- another vacuum cleaner running?
komal=>

What can I do to remove this portal ?

Philip


Re: [GENERAL] How to remove VACUUM lock?

From
The Hermit Hacker
Date:
On Fri, 22 May 1998, Philip Bierhoff wrote:

> Hi guyz,
>
> Because of some strange reason my VACUUM command resulted in a complete
> halt of the database PostgreSQL 6.3 on Linux 2.0.18 (already a simple
> select * resulted in a halt). I had to manually close the postmaster and
> all the locked backends before I could access my database again.
>
> Now the select * query works again, but issuing "vacuum" gives:
>
> Welcome to the POSTGRESQL interactive sql monitor:
>   Please read the file COPYRIGHT for copyright terms of POSTGRESQL
>
>    type \? for help on slash commands
>    type \q to quit
>    type \g or terminate with semicolon to execute query
>    You are currently connected to the database: komal
>
> komal=> vacuum;
> ERROR:  can't create lock file -- another vacuum cleaner running?
> komal=> vacuum;
> NOTICE:  CreatePortal: portal <vacuum> already exists
> ERROR:  can't create lock file -- another vacuum cleaner running?
> komal=>
>
> What can I do to remove this portal ?

    If you are 100% certain that there is no other vacuum process
running on that Database, go into the data/base/<database> directory and
remove the file 'pg_vlock' that you'll find in there...

    If you aren't 100% certain, shut down the server before  you
remove the lock file...

Marc G. Fournier
Systems Administrator @ hub.org
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org