Re: AccessShareLock question

From: Clayton Graf <clayton(dot)graf(at)gmail(dot)com>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: AccessShareLock question
Date: 2009-12-19 15:58:12
Message-ID: 7b2fe65d0912190758m469a084bgf84595972ecdd0c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ok, but this is really my problem: I cannot perform an ALTER TABLE with the
system in production mode, because the ALTER TABLE hangs due an
AccessShareLock.

We use two-tier mode, so is it necessary to shutdown all users before
perform an ALTER TABLE? Is it this true?

Thanks,

Clayton

2009/12/19 Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>

> On Sat, Dec 19, 2009 at 9:04 AM, Clayton Graf <clayton(dot)graf(at)gmail(dot)com>
> wrote:
> > I get an AccessShareLock in a simple select command and I am not using
> the
> > FOR SHARE clause.
>
> http://www.postgresql.org/docs/current/static/explicit-locking.html says:
> """
> ACCESS SHARE
>
> Conflicts with the ACCESS EXCLUSIVE lock mode only.
>
> The SELECT command acquires a lock of this mode on referenced
> tables. In general, any query that only reads a table and does not
> modify it will acquire this lock mode.
> """
> in other words, everything is ok, AccessShareLock doesn't block
> anything but with anyone trying to change the structure of the table
> (ALTER, DROP) and with commands TRUNCATE, REINDEX, CLUSTER, and VACUUM
> FULL, and every select take it
>
> --
> Atentamente,
> Jaime Casanova
> Soporte y capacitación de PostgreSQL
> Asesoría y desarrollo de sistemas
> Guayaquil - Ecuador
> Cel. +59387171157
>

--
Clayton Graf

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jaime Casanova 2009-12-19 16:19:21 Re: AccessShareLock question
Previous Message Jaime Casanova 2009-12-19 15:34:13 Re: AccessShareLock question