Re: synchronous_commit: Developer's View

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: synchronous_commit: Developer's View
Date: 2007-09-02 20:57:00
Message-ID: 1188766620.4167.45.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2007-08-30 at 21:00 -0400, Tom Lane wrote:
> "Florian G. Pflug" <fgp(at)phlo(dot)org> writes:
> > ... So at least for the pl/pgsql case, it seems easy enough to temporarily
> > change GUCs already. For other PLs, things might be different though -
> > I wouldn't know, I have never really used them...
>
> It's definitely possible, but it's inconvenient and slow (slow because
> you have to run a subtransaction, which ain't cheap). I think Simon
> might have a good point about generalizing the proposed "set the search
> path" facility to instead be "set any GUC for the duration of this
> function".

> He's definitely all wet about the usefulness of that for
> synchronous_commit, but as Greg pointed out, there are other GUCs
> besides search_path that can break a function's expectations.

Not too sure what "all wet" means, but the imagery is great. :-)

As I said, I'm looking for a way to decorate a specific transaction
without changing application code. Setting it on a function works fine
as long as the function was invoked as a top-level procedure call in its
own implicit transaction, which is common usage. Clearly, this doesn't
really make sense for non-procedural functions such as md5(), though it
does for things like record_vehicle_position() or ad_impression().

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 2007-09-02 21:35:55 Re: tsearch filenames unlikes special symbols and numbers
Previous Message Pavel Stehule 2007-09-02 20:28:20 tsearch filenames unlikes special symbols and numbers