Re: Why does VACUUM FULL pg_class sometimes wait for ShareLock on another transaction after getting AccessExclusiveLock on pg_class?

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Marcin Barczynski <mbarczynski(at)starfishstorage(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Why does VACUUM FULL pg_class sometimes wait for ShareLock on another transaction after getting AccessExclusiveLock on pg_class?
Date: 2021-07-22 13:51:32
Message-ID: 5ff10b4457613f0bbb768a883af40bdfdb8fe1cd.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2021-07-22 at 12:55 +0200, Marcin Barczynski wrote:
> There was a long-running transaction consisting of two queries:
>
> CREATE TEMPORARY TABLE abc AS SELECT * FROM def_view;
> INSERT INTO xyz_table SELECT * FROM abc;
>
> When I ran VACUUM FULL pg_class, it waited for ShareLock on that transaction:

There must have been something else using "pg_class", since the above
won't take any permament locks on "pg_class", nor should it block VACUUM.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2021-07-22 14:21:56 Re: Fwd: Postgres.exe crashes and tears down all apps, recovers and is running again
Previous Message Thomas Kellerer 2021-07-22 12:20:28 Re: Fwd: Postgres.exe crashes and tears down all apps, recovers and is running again