Skip site navigation (1) Skip section navigation (2)

Re: How long does commit take?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Phillip Smith" <phillip(dot)smith(at)weatherbeeta(dot)com(dot)au>
Cc: "'Daniel T(dot) Staal'" <DStaal(at)usa(dot)net>, pgsql-novice(at)postgresql(dot)org
Subject: Re: How long does commit take?
Date: 2007-04-27 00:04:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
"Phillip Smith" <phillip(dot)smith(at)weatherbeeta(dot)com(dot)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

In response to

pgsql-novice by date

Next:From: stephenDate: 2007-04-27 00:26:14
Subject: Re: cannot insert or update
Previous:From: Tom LaneDate: 2007-04-26 23:58:38
Subject: Re: record id

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group