Re: transaction toggling

From: Richard Huxton <dev(at)archonet(dot)com>
To: Matthew Peter <survivedsushi(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: transaction toggling
Date: 2005-10-05 08:42:44
Message-ID: 43439204.7060107@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Matthew Peter wrote:
> Is there a way to disable transactions on certian
> queries? I read a while back that this wasn't
> possible, just wondering if it is in 8.1 or planned in
> the future?
>
> Does it even make a dent in the performance if a query
> is wrapped in a transaction instead of out? Such as a
> view counter, like...
>
> update views = views + 1 where x = 1;?

It's not in general possible to have part of your database under
transactional control and part not.

For example, what happens in your update if there are two processes
incrementing the view counter - A is in a transaction, B is not.
A begins transaction
A increments view count
B increments view count
A rolls back transaction

What should happen here?
--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-10-05 08:45:04 Re: transaction toggling
Previous Message Richard Huxton 2005-10-05 08:38:34 Re: Untyped result (setof / rowset) from Functions ?