From:
Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To:
Zeugswetter Andreas ADI SD <ZeugswetterA(at)spardat(dot)at>
Cc:
Gregory Stark <stark(at)enterprisedb(dot)com>,
Jeff Davis <pgsql(at)j-davis(dot)com>,
"Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>,
Bruce Momjian <bruce(at)momjian(dot)us>,
Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org,
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,
"Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Subject:
Re: COMMIT NOWAIT Performance Option
Date:
2007-03-01 13:51:43
Message-ID:
45E6DA6F.8080603@enterprisedb.com (view raw or flat )
Thread:
2007-02-26 22:56:58 from "Simon Riggs" <simon(at)2ndquadrant(dot)com>
2007-02-26 23:06:19 from "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
2007-02-27 04:05:45 from "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>
2007-02-27 05:45:19 from "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
2007-02-26 23:25:31 from Richard Huxton <dev(at)archonet(dot)com>
2007-02-26 23:58:11 from "Simon Riggs" <simon(at)2ndquadrant(dot)com>
2007-02-27 00:20:53 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2007-02-27 07:07:22 from "Simon Riggs" <simon(at)2ndquadrant(dot)com>
2007-02-27 00:27:09 from "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
2007-03-04 04:19:00 from Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
2007-03-05 20:55:49 from "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
2007-02-27 02:44:34 from Jeff Davis <pgsql(at)j-davis(dot)com>
2007-02-27 03:06:47 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2007-02-27 04:04:07 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2007-02-27 10:49:32 from "Simon Riggs" <simon(at)2ndquadrant(dot)com>
2007-02-27 17:32:09 from "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
2007-02-27 17:36:08 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2007-02-27 18:37:30 from "Simon Riggs" <simon(at)2ndquadrant(dot)com>
2007-02-27 19:16:59 from "Zeugswetter Andreas ADI SD" <ZeugswetterA(at)spardat(dot)at>
2007-02-27 17:32:38 from Josh Berkus <josh(at)agliodbs(dot)com>
2007-02-27 19:36:18 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-02-27 19:56:16 from Josh Berkus <josh(at)agliodbs(dot)com>
2007-02-27 21:01:46 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-02-27 22:17:45 from Bruce Momjian <bruce(at)momjian(dot)us>
2007-02-27 22:30:01 from "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
2007-02-28 00:49:37 from Gregory Stark <stark(at)enterprisedb(dot)com>
2007-02-28 01:32:52 from "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
2007-02-28 01:36:00 from Bruce Momjian <bruce(at)momjian(dot)us>
2007-02-28 01:57:16 from "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
2007-02-27 20:13:26 from "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
2007-02-27 20:32:57 from Dave Page <dpage(at)postgresql(dot)org>
2007-02-27 20:34:21 from Jordan Henderson <jordan_henders(at)yahoo(dot)com>
2007-02-27 20:56:12 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2007-02-28 01:30:19 from Josh Berkus <josh(at)agliodbs(dot)com>
2007-02-28 01:51:04 from Gregory Stark <stark(at)enterprisedb(dot)com>
2007-02-28 01:40:33 from Josh Berkus <josh(at)agliodbs(dot)com>
2007-02-28 01:46:48 from Jeff Davis <pgsql(at)j-davis(dot)com>
2007-02-28 01:50:28 from Josh Berkus <josh(at)agliodbs(dot)com>
2007-02-28 02:13:11 from Gregory Stark <stark(at)enterprisedb(dot)com>
2007-02-28 03:43:53 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-02-28 11:10:04 from Gregory Stark <stark(at)enterprisedb(dot)com>
2007-02-28 15:27:48 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-02-28 15:47:04 from Gregory Stark <stark(at)enterprisedb(dot)com>
2007-02-28 15:57:03 from Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
2007-02-28 16:23:49 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-02-28 16:38:51 from "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
2007-02-28 17:19:20 from Gregory Stark <stark(at)enterprisedb(dot)com>
2007-02-28 17:31:27 from "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
2007-02-28 17:20:17 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-02-28 17:16:39 from Gregory Stark <stark(at)enterprisedb(dot)com>
2007-03-01 02:16:21 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-02-28 17:16:10 from Bruce Momjian <bruce(at)momjian(dot)us>
2007-02-28 17:28:57 from Gregory Stark <stark(at)enterprisedb(dot)com>
2007-02-28 17:34:52 from Bruce Momjian <bruce(at)momjian(dot)us>
2007-02-28 19:10:11 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-02-28 19:12:24 from Bruce Momjian <bruce(at)momjian(dot)us>
2007-02-28 19:27:08 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-02-28 19:35:09 from Bruce Momjian <bruce(at)momjian(dot)us>
2007-02-28 19:41:42 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-02-28 19:48:45 from Bruce Momjian <bruce(at)momjian(dot)us>
2007-02-28 19:52:11 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-02-28 23:49:59 from Bruce Momjian <bruce(at)momjian(dot)us>
2007-02-28 19:48:10 from Jeff Davis <pgsql(at)j-davis(dot)com>
2007-02-28 19:54:16 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-02-28 20:10:24 from "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
2007-02-28 20:39:18 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-02-28 20:44:36 from "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
2007-02-28 20:55:13 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-02-28 20:17:02 from Jeff Davis <pgsql(at)j-davis(dot)com>
2007-02-28 20:37:11 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-03-01 09:45:42 from "Zeugswetter Andreas ADI SD" <ZeugswetterA(at)spardat(dot)at>
2007-03-01 10:04:20 from Gregory Stark <stark(at)enterprisedb(dot)com>
2007-03-01 13:24:47 from "Zeugswetter Andreas ADI SD" <ZeugswetterA(at)spardat(dot)at>
2007-03-01 13:51:43 from Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
2007-02-28 20:08:00 from Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
2007-02-28 21:13:08 from Gregory Stark <stark(at)enterprisedb(dot)com>
2007-02-28 21:46:26 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-03-01 00:02:50 from Gregory Stark <stark(at)enterprisedb(dot)com>
2007-03-01 00:40:56 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-03-01 02:22:58 from "J(dot) Andrew Rogers" <jrogers(at)neopolitan(dot)com>
2007-03-01 03:06:00 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-03-01 03:34:21 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-03-01 05:20:07 from "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
2007-02-28 22:36:38 from Jeff Davis <pgsql(at)j-davis(dot)com>
2007-03-01 00:07:54 from Gregory Stark <stark(at)enterprisedb(dot)com>
2007-03-01 15:24:22 from "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
2007-02-28 10:40:29 from "Zeugswetter Andreas ADI SD" <ZeugswetterA(at)spardat(dot)at>
2007-02-28 23:23:32 from "Simon Riggs" <simon(at)2ndquadrant(dot)com>
2007-03-01 00:06:47 from Josh Berkus <josh(at)agliodbs(dot)com>
2007-02-27 21:37:46 from Bruce Momjian <bruce(at)momjian(dot)us>
2007-02-27 04:50:56 from "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
2007-02-27 06:29:33 from "Simon Riggs" <simon(at)2ndquadrant(dot)com>
2007-02-27 22:18:28 from Bruce Momjian <bruce(at)momjian(dot)us>
2007-02-27 23:59:41 from "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
2007-02-28 00:17:37 from Bruce Momjian <bruce(at)momjian(dot)us>
2007-02-28 00:21:04 from "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
2007-02-28 05:54:36 from "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>
Lists:
pgsql-hackers
Zeugswetter Andreas ADI SD wrote:
>>> Maybe a suitable replacement for full-page would be to sync the
> first
>>> WAL record for a page change before writing the buffer
>> We *always* sync WAL records for page changes before writing
>> the buffer for the page.
>
> Um, is that so ? And how is that done ? (e.g. bgwriter would need to
> wait for or even initiate a WAL record sync)
> Seems this is not clear to others eighter.
Yes. The bgwriter or backend that flushes the buffer indeed initiates a
WAL sync if the WAL record corresponding the LSN of the buffer hasn't
been flushed yet.
> Why else would people think we need a full data scan after crash without
> full-pages ?
They're confused. ;-)
> If this is true, all pages with possibly pending IO during crash will be
> touched and could thus be checked during startup recovery.
That's right. Torn page detection wouldn't require any extra I/O, just CPU.
> I can see that we need to sync wal before write for certain changes, but
> I don't see why we would currently need it for e.g. a heap insert, that
> gets a free slot.
The corresponding index insert might hit the disk but the heap insert
might not. Now if someone after the crash uses the same heap slot, you'd
end up with the index tuple of the aborted transaction pointing to wrong
heap tuple. There might be other error scenarios, that's just the first
example I could think of.
In practice, it's extremely rare for a writer to need to do the WAL
flush. When a buffer is chosen as a victim, it's been unused for some
time, and the WAL has already been flushed. It does happen when you're
vacuuming, see Simon's recent thread, but we should fix that anyway. It
also happens on checkpoints, but it's not a big performance issue.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
In response to
pgsql-hackers by date
Next :From: Zeugswetter Andreas ADI SDDate: 2007-03-01 13:52:16
Subject : Re: Resumable vacuum proposal and design overview
Previous :From : Zoltan BoszormenyiDate : 2007-03-01 13:50:30
Subject : Re: Is there a way to run heap_insert() AFTER ExecInsertIndexTuples()
?