From: | Mark Mielke <mark(at)mark(dot)mielke(dot)cc> |
---|---|
To: | Pavel Golub <pavel(at)gf(dot)microolap(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Greg Stark <stark(at)enterprisedb(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, "Joshua D(dot) Drake (Command Prompt, Inc(dot))" <jd(at)commandprompt(dot)com>, "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
Subject: | Re: Named transaction |
Date: | 2009-06-18 19:38:43 |
Message-ID: | 4A3A97C3.8010605@mark.mielke.cc |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 06/18/2009 02:42 AM, Pavel Golub wrote:
> Now to implement customer's desire in PostgreSQL there are two ways:
>
> 1. Each script must be executed in the separate connection context
>
> 2. Each script must be executed inside critical section, in other
> words current scipt must block others until COMMIT or ROLLBACK
>
> I don't like both.
>
What don't you like about 1) ?
I don't know of any other databases that work this way. Using separate
connections and connection pooling seems to be "the way to go" here.
Personally, I found the "named transaction" concept a little skrewy unless:
1) SQL commands can be sent asynchronously as long as they are for
different named transactions, even while other transactions are still
running.
2) Each transaction runs in a different server-side thread.
If this is what you want, it sounds like you are just trying to
multiplex multiple queries and responses over the same TCP/IP
connection. For the added complexity on both the client and the server,
do you really think it is worth it?
If you just want a connection multiplexor that is backed by a connection
pool - I think that would be a lot easier to provide. :-)
Cheers,
mark
--
Mark Mielke<mark(at)mielke(dot)cc>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-06-18 19:48:53 | Re: rc1 tarball contains partially outdated/missing man pages |
Previous Message | Tom Lane | 2009-06-18 18:01:20 | Re: rc tarball built with older flex version? |