| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
|---|---|
| To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> | 
| Cc: | Walter Coole <WCoole(at)aperiogroup(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>, Anirban Pal <anirban(dot)pal(at)newgen(dot)co(dot)in>, pgsql-novice(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: Why lots of temp schemas are being created | 
| Date: | 2010-02-04 02:35:50 | 
| Message-ID: | 4928.1265250950@sss.pgh.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general pgsql-novice | 
Alvaro Herrera <alvherre(at)commandprompt(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Yan Cheng Cheok | 2010-02-04 02:59:59 | Re: Is it necessary to have index for child table in following case? | 
| Previous Message | Jorge Godoy | 2010-02-04 01:56:40 | Re: Shall I apply normalization in the following case? | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Machiel Richards | 2010-02-04 06:37:29 | Postgres Trainign in RSA | 
| Previous Message | Alvaro Herrera | 2010-02-04 00:40:36 | Re: Why lots of temp schemas are being created |