pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Chris Hoover <revoohc@gmail.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: What happens on a commit?
Date: Wed, 23 May 2007 10:18:00 -0400
Message-ID: <20070523141800.GJ4642@alvh.no-ip.org> (raw)
In-Reply-To: <1d219a6f0705230713k83eff27y3a9db9ade4839ee0@mail.gmail.com>
References: <1d219a6f0705221025i1c1d036eq4769b133cac7499@mail.gmail.com>
	<1d219a6f0705221110v6718eaa1w67e17ac0c940772a@mail.gmail.com>
	<20070522193010.GH11032@alvh.no-ip.org>
	<1d219a6f0705230713k83eff27y3a9db9ade4839ee0@mail.gmail.com>

Chris Hoover escribió:
> Ok, we are looking more into this.  In the mean time, can someone please
> explain to me (or point me to the correct documentation) what happens in
> PostgreSQL when a commit is issued.  What exactly does the database do?

It writes a commit WAL record and flushes (fsync) the WAL up to that
point.  This is the more important bit.  Also, async notifies are sent
(those you started with NOTIFY), and files corresponding to some
commands are deleted (e.g. TRUNCATE, CLUSTER, REINDEX).  Temp tables
with ON COMMIT setting may be operated upon.  

It entirely depends on what the transaction did.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.



view thread (5+ messages)

Message-ID: <20070523141800.GJ4642@alvh.no-ip.org>
Permalink:  ../20070523141800.GJ4642@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20070523141800.GJ4642@alvh.no-ip.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: alvherre@commandprompt.com, revoohc@gmail.com
  Subject: Re: What happens on a commit?
  In-Reply-To: <20070523141800.GJ4642@alvh.no-ip.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox