Re: Performance question: Commit or rollback?

From: Chris Angelico <rosuav(at)gmail(dot)com>
To: vinny <vinny(at)xs4all(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Performance question: Commit or rollback?
Date: 2011-12-24 13:20:03
Message-ID: CAPTjJmqSS9VZR6k=Hs+688p88OeNfS+XHxtCR2hY_MDmfN+KHw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Dec 25, 2011 at 12:00 AM, vinny <vinny(at)xs4all(dot)nl> wrote:
> So, your read-only mode is basically a flag that forces your code to
> always issue a rollback at the end, instead of a commit for read/write
> mode.
>
> I find that a bit scary. :-)

It's three things:

1) BEGIN TRANSACTION READ ONLY instead of BEGIN TRANSACTION
2) A high level flag that tells the PHP code that it ought not to change things
3) ROLLBACK instead of COMMIT

ChrisA

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vincent Veyron 2011-12-24 17:03:07 Re: PostgreSQL DBA in SPAAAAAAAACE
Previous Message vinny 2011-12-24 13:00:30 Re: Performance question: Commit or rollback?