Thread: VACUUM on temp table blocks VACUUM on another...

VACUUM on temp table blocks VACUUM on another...

From
Jim Vanns
Date:
I have two sessions, each creating a temporary table of the same name - 'foobar'. Why would a vacuum of 'foobar' from one session block the vacuum of 'foobar' in the other session? They're in separate tablespaces (pg_temp_NN) and effectively distinct with respect to the sessions.

Cheers,

Jim

--
Jim Vanns
Principal Production Engineer
Industrial Light & Magic, London

Re: VACUUM on temp table blocks VACUUM on another...

From
Tom Lane
Date:
Jim Vanns <jvanns@ilm.com> writes:
> I have two sessions, each creating a temporary table of the same name -
> 'foobar'. Why would a vacuum of 'foobar' from one session block the vacuum
> of 'foobar' in the other session?

That's fairly hard to believe.  Can you provide a self-contained test
case?

            regards, tom lane



Re: VACUUM on temp table blocks VACUUM on another...

From
Adrian Klaver
Date:
On 8/1/24 12:12, Tom Lane wrote:
> Jim Vanns <jvanns@ilm.com> writes:
>> I have two sessions, each creating a temporary table of the same name -
>> 'foobar'. Why would a vacuum of 'foobar' from one session block the vacuum
>> of 'foobar' in the other session?
> 
> That's fairly hard to believe.  Can you provide a self-contained test
> case?

Would also be nice to know what version of Postgres and where you are 
running the server?

> 
>             regards, tom lane
> 
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com




Re: VACUUM on temp table blocks VACUUM on another...

From
Jim Vanns
Date:
Sorry, PG15.

Jim

On Thu, 1 Aug 2024 at 20:25, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 8/1/24 12:12, Tom Lane wrote:
> Jim Vanns <jvanns@ilm.com> writes:
>> I have two sessions, each creating a temporary table of the same name -
>> 'foobar'. Why would a vacuum of 'foobar' from one session block the vacuum
>> of 'foobar' in the other session?
>
> That's fairly hard to believe.  Can you provide a self-contained test
> case?

Would also be nice to know what version of Postgres and where you are
running the server?

>
>                       regards, tom lane
>
>

--
Adrian Klaver
adrian.klaver@aklaver.com



--
Jim Vanns
Principal Production Engineer
Industrial Light & Magic, London

Re: VACUUM on temp table blocks VACUUM on another...

From
Jim Vanns
Date:
I don't at hand, but the query I used to identify this was;

SELECT state, pid, pg_blocking_pids(pid), query
FROM pg_stat_activity
WHERE backend_type='client backend';

On Thu, 1 Aug 2024 at 20:12, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Jim Vanns <jvanns@ilm.com> writes:
> I have two sessions, each creating a temporary table of the same name -
> 'foobar'. Why would a vacuum of 'foobar' from one session block the vacuum
> of 'foobar' in the other session?

That's fairly hard to believe.  Can you provide a self-contained test
case?

                        regards, tom lane


--
Jim Vanns
Principal Production Engineer
Industrial Light & Magic, London

Re: VACUUM on temp table blocks VACUUM on another...

From
Ron Johnson
Date:
PG 15.0 or 15.7?

On Thu, Aug 1, 2024 at 3:58 PM Jim Vanns <jvanns@ilm.com> wrote:
Sorry, PG15.

Jim

On Thu, 1 Aug 2024 at 20:25, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 8/1/24 12:12, Tom Lane wrote:
> Jim Vanns <jvanns@ilm.com> writes:
>> I have two sessions, each creating a temporary table of the same name -
>> 'foobar'. Why would a vacuum of 'foobar' from one session block the vacuum
>> of 'foobar' in the other session?
>
> That's fairly hard to believe.  Can you provide a self-contained test
> case?

Would also be nice to know what version of Postgres and where you are
running the server?

>
>                       regards, tom lane
>
>

--
Adrian Klaver
adrian.klaver@aklaver.com



--
Jim Vanns
Principal Production Engineer
Industrial Light & Magic, London

Re: VACUUM on temp table blocks VACUUM on another...

From
Jim Vanns
Date:
PG 15.4

On Thu, 1 Aug 2024 at 22:27, Ron Johnson <ronljohnsonjr@gmail.com> wrote:
PG 15.0 or 15.7?

On Thu, Aug 1, 2024 at 3:58 PM Jim Vanns <jvanns@ilm.com> wrote:
Sorry, PG15.

Jim

On Thu, 1 Aug 2024 at 20:25, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 8/1/24 12:12, Tom Lane wrote:
> Jim Vanns <jvanns@ilm.com> writes:
>> I have two sessions, each creating a temporary table of the same name -
>> 'foobar'. Why would a vacuum of 'foobar' from one session block the vacuum
>> of 'foobar' in the other session?
>
> That's fairly hard to believe.  Can you provide a self-contained test
> case?

Would also be nice to know what version of Postgres and where you are
running the server?

>
>                       regards, tom lane
>
>

--
Adrian Klaver
adrian.klaver@aklaver.com



--
Jim Vanns
Principal Production Engineer
Industrial Light & Magic, London


--
Jim Vanns
Principal Production Engineer
Industrial Light & Magic, London

Re: VACUUM on temp table blocks VACUUM on another...

From
Adrian Klaver
Date:
On 8/1/24 15:13, Jim Vanns wrote:
> PG 15.4

Community edition or some variant?




-- 
Adrian Klaver
adrian.klaver@aklaver.com




Re: VACUUM on temp table blocks VACUUM on another...

From
Jim Vanns
Date:
Official PGDB RPM build for Centos 7.9

On Thu, 1 Aug 2024 at 23:31, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 8/1/24 15:13, Jim Vanns wrote:
> PG 15.4

Community edition or some variant?




--
Adrian Klaver
adrian.klaver@aklaver.com



--
Jim Vanns
Principal Production Engineer
Industrial Light & Magic, London

Re: VACUUM on temp table blocks VACUUM on another...

From
Jim Vanns
Date:
*PGDG

On Fri, 2 Aug 2024 at 08:38, Jim Vanns <jvanns@ilm.com> wrote:
Official PGDB RPM build for Centos 7.9

On Thu, 1 Aug 2024 at 23:31, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 8/1/24 15:13, Jim Vanns wrote:
> PG 15.4

Community edition or some variant?




--
Adrian Klaver
adrian.klaver@aklaver.com



--
Jim Vanns
Principal Production Engineer
Industrial Light & Magic, London


--
Jim Vanns
Principal Production Engineer
Industrial Light & Magic, London