Re: Performance question: Commit or rollback?

From: Chris Travers <chris(dot)travers(at)gmail(dot)com>
To: Chris Angelico <rosuav(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Performance question: Commit or rollback?
Date: 2011-12-18 03:02:00
Message-ID: CAKt_ZfvU3__L+Swu3uR_QVib82_HMomqwGNq1xWSH+fH88_W4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Dec 17, 2011 at 6:53 PM, Chris Angelico <rosuav(at)gmail(dot)com> wrote:
> Some of my code involves transactions which will not have significant
> effect on the database. It might be a read-only transaction (possibly
> declared as one, but possibly not), or perhaps a completely empty
> transaction - I have a framework that will always open a transaction,
> then call on other code, and then complete the transaction at the
> bottom.
>
> In these instances, is it better to commit or to rollback? Are there
> performance penalties to either option?

I do not believe there are performance penalties for either. All
commit or rollback does is determine visibility of changes made.

Best Wishes,
Chris Travers

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Angelico 2011-12-18 03:05:59 Re: Performance question: Commit or rollback?
Previous Message Chris Angelico 2011-12-18 02:53:00 Performance question: Commit or rollback?