Re: What kind of locks does vacuum process hold on the db?

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Nitin Verma" <nitinverma(at)azulsystems(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: What kind of locks does vacuum process hold on the db?
Date: 2007-08-30 04:59:04
Message-ID: dcc563d10708292159l978f750gb01ccb19036d3c64@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/29/07, Nitin Verma <nitinverma(at)azulsystems(dot)com> wrote:
> What kind of locks does it hold on the db? Table level / Row level /
> AccessExclusiveLock ?
> Is there a document that details vacuum process, and its internals?
>
>
> Use case: I am doing a vacuum {all full analyze} on a postgres 8.1 hosting
> two user databases. For this I am using ${pg-home}/bin/vacuumdb, not direct
> SQLs. Parallel to this I am running transaction on both user-DBs.
> Observation:
> Transactions don't pause while vacuum is running. (Odd, how come?)

Why are you doing FULL vacuums? Is there some problem that regular
vacuums aren't solving?

> After this I tried two vacuums in parallel but those lock each other.

Yes, vacuum full takes a hard lock on a table.

Vacuum full is to be avoided.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jaime Casanova 2007-08-30 05:15:51 Re: Can this function be declared IMMUTABLE?
Previous Message Manchenahalli, Raghunandan (STSD) 2007-08-30 04:53:24 Timezone - UTC