Re: [GENERAL] Why lots of temp schemas are being created - Mailing list pgsql-novice

From Tom Lane
Subject Re: [GENERAL] Why lots of temp schemas are being created
Date
Msg-id 4928.1265250950@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why lots of temp schemas are being created  (Walter Coole <WCoole@aperiogroup.com>)
List pgsql-novice
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Temp schemas are not destroyed on session shutdown; they are rather
> destroyed the next time the backend ID is reused.  Normally that's not a
> problem, because a backend ID is reused pretty soon.  It's only a
> problem when you use so high a backend ID due to high load, that a very
> long time passes before it's reused.  Those temp tables linger and can
> cause Xid wraparound problems.

Not correct --- ordinarily temp tables are removed at backend shutdown.
The only time that wouldn't happen is in event of a backend crash.  In
which case cleanup would happen at next use, as you describe.

The schemas are indeed left around, but they're empty in the normal case.

            regards, tom lane

pgsql-novice by date:

Previous
From: Walter Coole
Date:
Subject: Re: [GENERAL] Why lots of temp schemas are being created
Next
From: "Machiel Richards"
Date:
Subject: Postgres Trainign in RSA