Re: [COMMITTERS] pgsql: Create a GUC parametertemp_tablespacesthat allows selection of - Mailing list pgsql-hackers

From Jaime Casanova
Subject Re: [COMMITTERS] pgsql: Create a GUC parametertemp_tablespacesthat allows selection of
Date
Msg-id c2d9e70e0706062108w30b766f7q3d5b6d978af33967@mail.gmail.com
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Create a GUC parametertemp_tablespacesthat allows selection of  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [COMMITTERS] pgsql: Create a GUC parametertemp_tablespacesthat allows selection of  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 6/4/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Perhaps a reasonable compromise could work like this: at the first point
> in a transaction where a temp file is created, choose a random list
> element, and thereafter advance cyclically for the duration of that
> transaction.  This ensures within-transaction spread-out while still
> having some randomness across backends.
>
> The reason I'm thinking per-transaction is that we could tie this to
> setting up a cached list of tablespace OIDs, which would avoid the
> overhead of repeat parsing and tablespace validity checking.  We had
> rejected using a long-lived cache because of the problem of tablespaces
> getting dropped, but I think one that lasts only across a transaction
> would be OK.
>
> And the reason I'm thinking a cache is important is that if you really
> want to get any win from this idea, you need to spread the temp files
> across tablespaces *per file*, which is not the way it works now.

ok. are you doing this? or can i prepare a patch that implements this?
i guess we can allocate the memory for the list in TopTransactionContext.

-- 
regards,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."                                      Richard Cook


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Vacuuming anything zeroes shared table stats
Next
From: "Jim C. Nasby"
Date:
Subject: Re: To all the pgsql developers..Have a look at the operators proposed by me in my researc