Thread: What is pg_toast_temp_* in my DB?
What is pg_toast_temp_* in my DB?
Date: Tue, 4 Jan 2011 15:53:30 +0600
Subject: [GENERAL] What is pg_toast_temp_* in my DB?
From: rummandba@gmail.com
To: pgsql-general@postgresql.org
What is pg_toast_temp_* in my DB?
Hello!
pg_toast_temp_* are some special schemas where temporary tables are created.
Having special schemas for temporary tables allows low-level code to recognize such tables as temp ones, so we have many optimizations.
I believe that in the documentation there's more explanations about it.
Regards,
Andre Fernandes.
On Tuesday 04 January 2011 3:04:29 am André Fernandes wrote: > Date: Tue, 4 Jan 2011 15:53:30 +0600 > Subject: [GENERAL] What is pg_toast_temp_* in my DB? > From: rummandba@gmail.com > To: pgsql-general@postgresql.org > > What is pg_toast_temp_* in my DB? > > Hello! > > pg_toast_temp_* are some special schemas where temporary tables are > created. Having > special schemas for temporary tables allows low-level code to recognize > such tables as temp ones, so we have many optimizations. > I believe that in the documentation there's more explanations about it. > > Regards, > Andre Fernandes. To get technical, temporary tables are put in pg_temp_* And per the release notes for 8.3: Place temporary tables' TOAST tables in special schemas named pg_toast_temp_nnn (Tom) This allows low-level code to recognize these tables as temporary, which enables various optimizations such as not WAL-logging changes and using local rather than shared buffers for access. This also fixes a bug wherein backends unexpectedly held open file references to temporary TOAST tables. -- Adrian Klaver adrian.klaver@gmail.com