Re: What is pg_toast_temp_* in my DB?

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: André Fernandes <andre(dot)de(dot)camargo(dot)fernandes(at)hotmail(dot)com>
Subject: Re: What is pg_toast_temp_* in my DB?
Date: 2011-01-04 15:13:21
Message-ID: 201101040713.21944.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)gmail(dot)com
> To: pgsql-general(at)postgresql(dot)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(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2011-01-04 15:15:44 Re: Warning: database postgres must be vacuumed within 1000000 transactions
Previous Message Radosław Smogura 2011-01-04 14:48:25 Re: Date Parameter To Query Confusing Optimizer