Thread: temp_buffers

temp_buffers

From
"Joshua D. Drake"
Date:
Hello,

Can someone give me a reasonable explanation of what temp_buffers is for?

Sincerely,

Joshua D. Drake

-- 
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


Re: temp_buffers

From
Alvaro Herrera
Date:
On Thu, Jul 07, 2005 at 04:16:58PM -0700, Joshua D. Drake wrote:

> Can someone give me a reasonable explanation of what temp_buffers is for?

Number of buffers to be used for temp tables.  Think shared_buffers, but
local to a connection instead of shared.

They are also used for new relations, in the transaction they are being
created.  Because no one else can see the relation, there's no point in
sharing their pages.

-- 
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"¿Que diferencia tiene para los muertos, los huérfanos, y aquellos que han
perdido su hogar, si la loca destrucción ha sido realizada bajo el nombre
del totalitarismo o del santo nombre de la libertad y la democracia?" (Gandhi)


Re: temp_buffers

From
Tom Lane
Date:
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On Thu, Jul 07, 2005 at 04:16:58PM -0700, Joshua D. Drake wrote:
>> Can someone give me a reasonable explanation of what temp_buffers is for?

> Number of buffers to be used for temp tables.  Think shared_buffers, but
> local to a connection instead of shared.

> They are also used for new relations, in the transaction they are being
> created.  Because no one else can see the relation, there's no point in
> sharing their pages.

No, temp buffers are *only* used for temp tables.  Several versions back
the code acted as you say, but we got rid of that because it was more of
a headache than it was worth.
        regards, tom lane