VACUUM on temp table blocks VACUUM on another...

Started by Jim Vannsover 1 year ago10 messagesgeneral
Jump to latest
#1Jim Vanns
jvanns@ilm.com

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jim Vanns (#1)
Re: VACUUM on temp table blocks VACUUM on another...

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

#3Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Tom Lane (#2)
Re: VACUUM on temp table blocks VACUUM on another...

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

#4Jim Vanns
jvanns@ilm.com
In reply to: Adrian Klaver (#3)
Re: VACUUM on temp table blocks VACUUM on another...

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

#5Jim Vanns
jvanns@ilm.com
In reply to: Tom Lane (#2)
Re: VACUUM on temp table blocks VACUUM on another...

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

#6Ron
ronljohnsonjr@gmail.com
In reply to: Jim Vanns (#4)
Re: VACUUM on temp table blocks VACUUM on another...

PG 15.0 or 15.7?

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

Show quoted text

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

#7Jim Vanns
jvanns@ilm.com
In reply to: Ron (#6)
Re: VACUUM on temp table blocks VACUUM on another...

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

#8Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Jim Vanns (#7)
Re: VACUUM on temp table blocks VACUUM on another...

On 8/1/24 15:13, Jim Vanns wrote:

PG 15.4

Community edition or some variant?

--
Adrian Klaver
adrian.klaver@aklaver.com

#9Jim Vanns
jvanns@ilm.com
In reply to: Adrian Klaver (#8)
Re: VACUUM on temp table blocks VACUUM on another...

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

#10Jim Vanns
jvanns@ilm.com
In reply to: Jim Vanns (#9)
Re: VACUUM on temp table blocks VACUUM on another...

*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