Re: How long does commit take? - Mailing list pgsql-novice

From Tom Lane
Subject Re: How long does commit take?
Date
Msg-id 28887.1177632263@sss.pgh.pa.us
Whole thread Raw
In response to Re: How long does commit take?  ("Phillip Smith" <phillip.smith@weatherbeeta.com.au>)
List pgsql-novice
"Phillip Smith" <phillip.smith@weatherbeeta.com.au> writes:
> I'd believe that those few milliseconds occur before the database returns to
> the client that the COMMIT completed successfully. It is available
> immediately as soon at the COMMIT command is COMPLETED to the client, not as
> soon as the COMMIT is STARTED.

Actually, it's available at the instant the XID is removed from the
ProcArray and therefore stops appearing to be IN PROGRESS to other
transactions (not sooner, not later --- we have expended no little
effort to make sure that transaction commit appears atomic to onlooking
processes).  The report to the client that the commit is done will
happen some little while after that; there's some post-commit cleanup
involved, plus message transmission.

            regards, tom lane

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: record id
Next
From: "stephen"
Date:
Subject: Re: cannot insert or update