Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id BC0F49FBB4C for ; Wed, 23 May 2007 11:18:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 86810-06 for ; Wed, 23 May 2007 11:18:06 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id 2BA3E9FBB22 for ; Wed, 23 May 2007 11:18:05 -0300 (ADT) Received: from perhan.alvh.no-ip.org (201-221-217-243.bk12-dsl.surnet.cl [201.221.217.243]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l4NEI3dX018455; Wed, 23 May 2007 07:18:03 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id DF7C432A14; Wed, 23 May 2007 10:18:00 -0400 (CLT) Date: Wed, 23 May 2007 10:18:00 -0400 From: Alvaro Herrera To: Chris Hoover Cc: "pgsql-admin@postgresql.org" Subject: Re: What happens on a commit? Message-ID: <20070523141800.GJ4642@alvh.no-ip.org> References: <1d219a6f0705221025i1c1d036eq4769b133cac7499@mail.gmail.com> <1d219a6f0705221110v6718eaa1w67e17ac0c940772a@mail.gmail.com> <20070522193010.GH11032@alvh.no-ip.org> <1d219a6f0705230713k83eff27y3a9db9ade4839ee0@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1d219a6f0705230713k83eff27y3a9db9ade4839ee0@mail.gmail.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Wed, 23 May 2007 07:18:03 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/248 X-Sequence-Number: 25568 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.