Re: [COMMITTERS] pgsql: Create a GUC parametertemp_tablespacesthat allows selection of

From: "Jaime Casanova" <systemguards(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Simon Riggs" <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Create a GUC parametertemp_tablespacesthat allows selection of
Date: 2007-06-07 04:08:00
Message-ID: c2d9e70e0706062108w30b766f7q3d5b6d978af33967@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 6/4/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2007-06-07 09:56:25 pgsql: The functions bt_metap, bt_page_stats and bt_page_items had moved
Previous Message User Pgunittest 2007-06-06 23:39:04 pgunittest - pgUnitTest:

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2007-06-07 04:47:30 Re: To all the pgsql developers..Have a look at the operators proposed by me in my researc
Previous Message Alvaro Herrera 2007-06-07 01:56:45 Re: BUG #3326: Invalid lower bound of autovacuum_cost_limit