Re: PG optimization question

From: Pierre Frédéric Caillaud <lists(at)peufeu(dot)com>
To: "Robert Haas" <robertmhaas(at)gmail(dot)com>
Cc: "Hannu Krosing" <hannu(at)2ndquadrant(dot)com>, Nickolay <nitro(at)zhukcity(dot)ru>, pgsql-performance(at)postgresql(dot)org
Subject: Re: PG optimization question
Date: 2010-01-11 11:25:26
Message-ID: op.u6c8ooojcke6l8@soyouz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sun, 10 Jan 2010 19:45:32 +0100, Robert Haas <robertmhaas(at)gmail(dot)com>
wrote:

> 2010/1/10 Pierre Frédéric Caillaud <lists(at)peufeu(dot)com>:
>>
>>> If you transfer (delete from staging, insert into archive) in one
>>> transaction , then it will be always visible in exactly one of them,
>>> and exatly once in a view over both staging and archive(s).
>>
>>        Does the latest version implement this :
>>
>> INSERT INTO archive (...) DELETE FROM staging WHERE ... RETURNING ...
>
> No. There are no plans to support that, though there are proposals to
> support:
>
> WITH x AS (DELETE FROM staging WHERE ... RETURNING ...) INSERT INTO
> archive (...) SELECT ... FROM x
>
> I'm not sure how much that will help though since, in the designs so
> far discused, the tuples won't be pipelined.
>
> ...Robert
>

Yeah, but it's a lot more user-friendly than SELECT FOR UPDATE, INSERT
SELECT, DELETE...

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Bob Dusek 2010-01-11 13:44:04 performance config help
Previous Message Pierre Frédéric Caillaud 2010-01-11 11:23:53 Re: Choice of bitmap scan over index scan