Thread: [Fwd: Re: [GENERAL] temp schemas]
May be a TODO item here. -------- Forwarded Message -------- > From: Tom Lane <tgl@sss.pgh.pa.us> > To: Roberts, Jon <Jon.Roberts@asurion.com> > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] temp schemas > Date: Thu, 28 Aug 2008 14:23:10 -0400 > > "Roberts, Jon" <Jon.Roberts@asurion.com> writes: > > I am noticing a large number of temp schemas in my database. We use > > temp tables but it doesn't appear that the schemas get dropped for some > > reason. > > That's intentional. There doesn't seem a lot of value in dropping a > catalog entry that'll just have to be created again later. > > > This greatly slows down how long it takes pgAdmin to connect > > because it retrieves thousands of pg_temp_% schemas. > > Why have you got thousands of them? If you are running with thousands > of active backends, may I suggest a connection pooler? > > (It might be a good idea to fix pgAdmin so it ignores other sessions' > temp schemas, though.) > > regards, tom lane > -- Devrim GÜNDÜZ, RHCE devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org
Attachment
No, user error. On Thu, Aug 28, 2008 at 7:53 PM, Devrim GÜNDÜZ <devrim@gunduz.org> wrote: > > May be a TODO item here. > > -------- Forwarded Message -------- >> From: Tom Lane <tgl@sss.pgh.pa.us> >> To: Roberts, Jon <Jon.Roberts@asurion.com> >> Cc: pgsql-general@postgresql.org >> Subject: Re: [GENERAL] temp schemas >> Date: Thu, 28 Aug 2008 14:23:10 -0400 >> >> "Roberts, Jon" <Jon.Roberts@asurion.com> writes: >> > I am noticing a large number of temp schemas in my database. We use >> > temp tables but it doesn't appear that the schemas get dropped for some >> > reason. >> >> That's intentional. There doesn't seem a lot of value in dropping a >> catalog entry that'll just have to be created again later. >> >> > This greatly slows down how long it takes pgAdmin to connect >> > because it retrieves thousands of pg_temp_% schemas. >> >> Why have you got thousands of them? If you are running with thousands >> of active backends, may I suggest a connection pooler? >> >> (It might be a good idea to fix pgAdmin so it ignores other sessions' >> temp schemas, though.) >> >> regards, tom lane >> > -- > Devrim GÜNDÜZ, RHCE > devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr > http://www.gunduz.org > -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
Actually, might it be an idea to stick the temp tables in their own "subnode", that won't be loaded unless someone actually intentionally looks at it? //mha Dave Page wrote: > No, user error. > > On Thu, Aug 28, 2008 at 7:53 PM, Devrim GÜNDÜZ <devrim@gunduz.org> wrote: >> May be a TODO item here. >> >> -------- Forwarded Message -------- >>> From: Tom Lane <tgl@sss.pgh.pa.us> >>> To: Roberts, Jon <Jon.Roberts@asurion.com> >>> Cc: pgsql-general@postgresql.org >>> Subject: Re: [GENERAL] temp schemas >>> Date: Thu, 28 Aug 2008 14:23:10 -0400 >>> >>> "Roberts, Jon" <Jon.Roberts@asurion.com> writes: >>>> I am noticing a large number of temp schemas in my database. We use >>>> temp tables but it doesn't appear that the schemas get dropped for some >>>> reason. >>> That's intentional. There doesn't seem a lot of value in dropping a >>> catalog entry that'll just have to be created again later. >>> >>>> This greatly slows down how long it takes pgAdmin to connect >>>> because it retrieves thousands of pg_temp_% schemas. >>> Why have you got thousands of them? If you are running with thousands >>> of active backends, may I suggest a connection pooler? >>> >>> (It might be a good idea to fix pgAdmin so it ignores other sessions' >>> temp schemas, though.) >>> >>> regards, tom lane >>> >> -- >> Devrim GÜNDÜZ, RHCE >> devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr >> http://www.gunduz.org >> > > >
On Thu, Aug 28, 2008 at 10:05 PM, Magnus Hagander <magnus@hagander.net> wrote: > Actually, might it be an idea to stick the temp tables in their own > "subnode", that won't be loaded unless someone actually intentionally > looks at it? I don't think it's worth the pain to be honest. Temp tables will only show up under temp schemas anyway, and they are hidden by default. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com