From:
Simon Riggs <simon(at)2ndquadrant(dot)com>
To:
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc:
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,Martijn van Oosterhout <kleptog(at)svana(dot)org>,Greg Stark <gsstark(at)mit(dot)edu>, Rod Taylor <pg(at)rbt(dot)ca>,Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject:
Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and
Date:
2006-01-04 00:11:55
Message-ID:
1136333515.5052.273.camel@localhost.localdomain (view raw or flat )
Thread:
2005-12-22 14:31:33 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2005-12-22 17:12:04 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-12-22 20:10:54 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2006-01-03 13:08:46 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2005-12-22 18:37:51 from "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
2005-12-22 18:38:45 from "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
2005-12-22 20:18:26 from Martijn van Oosterhout <kleptog(at)svana(dot)org>
2005-12-22 22:13:03 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2005-12-22 22:36:25 from Stephen Frost <sfrost(at)snowman(dot)net>
2005-12-23 10:18:43 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2005-12-22 23:52:38 from "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
2005-12-23 00:05:10 from "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
2005-12-23 00:29:29 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-12-23 00:53:04 from "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
2005-12-23 04:31:07 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-12-24 02:37:42 from Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>
2005-12-24 03:00:39 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-12-24 03:29:50 from Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>
2005-12-24 03:41:42 from Greg Stark <gsstark(at)mit(dot)edu>
2005-12-24 03:50:57 from "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
2005-12-24 04:06:21 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-12-24 07:01:17 from Greg Stark <gsstark(at)mit(dot)edu>
2005-12-27 17:07:29 from "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
2005-12-27 22:41:57 from Hannu Krosing <hannu(at)skype(dot)net>
2005-12-28 00:30:12 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-12-24 04:19:01 from Rod Taylor <pg(at)rbt(dot)ca>
2005-12-24 08:23:42 from Martijn van Oosterhout <kleptog(at)svana(dot)org>
2005-12-24 15:16:52 from Greg Stark <gsstark(at)mit(dot)edu>
2005-12-24 15:32:29 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-12-26 12:03:27 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2005-12-26 12:22:12 from Martijn van Oosterhout <kleptog(at)svana(dot)org>
2005-12-26 16:00:51 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2005-12-27 18:20:29 from Martijn van Oosterhout <kleptog(at)svana(dot)org>
2005-12-27 22:47:31 from Hannu Krosing <hannu(at)skype(dot)net>
2005-12-28 08:50:26 from Martijn van Oosterhout <kleptog(at)svana(dot)org>
2005-12-29 01:58:14 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2005-12-29 03:05:30 from "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
2005-12-29 04:09:21 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2005-12-29 13:19:45 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2005-12-29 14:35:27 from Rod Taylor <pg(at)rbt(dot)ca>
2005-12-29 15:10:40 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2005-12-29 16:12:11 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-12-29 16:37:39 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2005-12-30 13:09:12 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2005-12-30 14:53:33 from "Andrew Dunstan" <andrew(at)dunslane(dot)net>
2005-12-30 14:57:06 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-12-30 17:39:21 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2005-12-30 17:58:15 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2006-01-03 15:58:34 from "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
2006-01-03 16:26:51 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2006-01-03 16:43:25 from "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
2006-01-03 16:48:01 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2006-01-03 17:08:05 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2006-01-03 21:16:55 from "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
2006-01-03 21:20:47 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2006-01-03 21:27:50 from "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
2006-01-03 22:38:25 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2006-01-03 23:23:54 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2006-01-04 01:16:19 from Josh Berkus <josh(at)agliodbs(dot)com>
2006-01-04 04:24:09 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2006-01-03 23:10:16 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2005-12-30 16:49:59 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2005-12-30 19:28:41 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2005-12-30 21:14:49 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2005-12-30 22:36:24 from Greg Stark <gsstark(at)mit(dot)edu>
2005-12-30 22:46:45 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2005-12-30 23:04:33 from Greg Stark <gsstark(at)mit(dot)edu>
2005-12-30 23:09:00 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2005-12-30 22:50:21 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2005-12-30 22:52:49 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2006-01-01 01:02:24 from August Zajonc <augustz(at)augustz(dot)com>
2005-12-31 11:59:44 from "Michael Paesold" <mpaesold(at)gmx(dot)at>
2006-01-03 23:58:09 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2006-01-03 22:53:53 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2006-01-05 17:22:28 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2006-01-04 00:11:55 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2006-01-05 17:27:05 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2006-01-05 21:56:21 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2006-02-04 03:29:48 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2006-02-07 00:07:57 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2006-02-07 02:08:08 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2006-02-07 02:24:31 from Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
2006-02-07 04:07:41 from Rick Gigger <rick(at)alpinenetworking(dot)com>
2006-02-07 04:13:59 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2006-02-07 06:51:13 from Rick Gigger <rick(at)alpinenetworking(dot)com>
2006-02-07 09:40:37 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2006-02-08 01:44:24 from Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
2006-02-08 02:00:51 from "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
2006-02-07 02:27:45 from Doug McNaught <doug(at)mcnaught(dot)org>
2005-12-29 16:14:37 from "Andrew Dunstan" <andrew(at)dunslane(dot)net>
2005-12-29 16:05:42 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2005-12-29 16:24:28 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2006-01-03 15:45:21 from "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
2006-01-03 16:21:37 from Stephen Frost <sfrost(at)snowman(dot)net>
2006-01-03 16:29:02 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2006-01-03 16:38:52 from "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
2006-01-03 16:55:15 from Stephen Frost <sfrost(at)snowman(dot)net>
2006-01-03 16:54:01 from Stephen Frost <sfrost(at)snowman(dot)net>
2006-01-03 17:37:32 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2006-01-03 18:30:56 from Stephen Frost <sfrost(at)snowman(dot)net>
2005-12-29 17:20:32 from Greg Stark <gsstark(at)mit(dot)edu>
2005-12-29 17:30:49 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2005-12-24 14:18:17 from Simon Riggs <simon(at)2ndquadrant(dot)com>
Lists:
pgsql-hackers
On Thu, 2005-12-29 at 11:37 -0500, Bruce Momjian wrote:
> Having COPY behave differently because it is
> in a transaction is fine as long as it is user-invisible, but once you
> require users to do that to get the speedup, it isn't user-invisible
> anymore.
Since we're agreed on adding ALTER TABLE rather than COPY LOCK, we have
our explicit mechanism for speedup.
However, it costs a single line of code and very very little execution
time to add in the optimization to COPY to make it bypass WAL when
executed in the same transaction that created the table. Everything else
is already there.
As part of the use_wal test:
+ if (resultRelInfo->ri_NumIndices == 0 &&
+ !XLogArchivingActive() &&
>> (cstate->rel->rd_createSubid != InvalidSubTransactionId ))
+ use_wal = false;
the value is already retrieved from cache...
Can anyone see a reason *not* to put that change in also? We just don't
advertise it as the "suggested" route to gaining performance, nor would
we rely on it for pg_dump/restore performance.
Best Regards, Simon Riggs
In response to
Responses
pgsql-hackers by date
Next :From: Josh BerkusDate: 2006-01-04 01:16:19
Subject : Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and
Previous :From : Simon RiggsDate : 2006-01-03 23:58:09
Subject : Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and