From:
Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To:
Bruce Momjian <bruce(at)momjian(dot)us>
Cc:
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>,
pgsql-hackers(at)postgresql(dot)org
Subject:
Re: crash-safe visibility map, take three
Date:
2010-12-01 13:53:12
Message-ID:
4CF65348.7070903@enterprisedb.com (view raw or flat )
Thread:
2010-11-30 04:57:25 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-11-30 07:34:04 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-11-30 15:32:15 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-11-30 15:43:47 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-11-30 15:54:50 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-11-30 16:40:10 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-11-30 16:48:08 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-11-30 16:54:43 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-11-30 16:59:20 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-11-30 17:01:56 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-11-30 15:38:02 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-11-30 15:46:44 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-11-30 15:53:25 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-11-30 16:02:05 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-11-30 16:16:33 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-11-30 16:22:03 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-11-30 16:27:04 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-11-30 16:33:18 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-11-30 16:47:40 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-11-30 16:49:34 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-11-30 16:55:44 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-11-30 17:00:29 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-11-30 17:10:49 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-11-30 17:12:35 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-11-30 17:22:02 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-11-30 17:25:18 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-11-30 17:36:07 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-11-30 17:25:41 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-11-30 17:26:08 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-11-30 16:59:47 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-12-01 01:35:56 from Bruce Momjian <bruce(at)momjian(dot)us>
2010-12-01 07:35:40 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-12-01 13:39:07 from Bruce Momjian <bruce(at)momjian(dot)us>
2010-12-01 13:53:12 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-12-01 14:57:51 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2010-12-01 15:46:21 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-12-01 15:36:51 from Bruce Momjian <bruce(at)momjian(dot)us>
2010-12-01 16:25:36 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-12-01 16:40:39 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-12-01 16:43:39 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-12-01 17:23:50 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-12-01 16:40:46 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-12-01 16:44:12 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-12-01 16:48:03 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-12-01 17:22:41 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-12-01 17:31:36 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-12-01 20:31:27 from Jeff Davis <pgsql(at)j-davis(dot)com>
2010-12-01 20:59:49 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-12-01 21:27:28 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-12-01 22:24:22 from Jeff Davis <pgsql(at)j-davis(dot)com>
2010-12-02 04:22:12 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-12-02 11:37:57 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2010-12-02 14:37:37 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-12-02 19:01:43 from Jeff Davis <pgsql(at)j-davis(dot)com>
2010-12-02 19:16:09 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2010-12-02 22:00:18 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-12-02 23:37:05 from Jeff Davis <pgsql(at)j-davis(dot)com>
2010-12-03 00:06:29 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-12-03 00:40:44 from Jeff Davis <pgsql(at)j-davis(dot)com>
2010-12-01 23:41:33 from Jim Nasby <jim(at)nasby(dot)net>
2010-12-02 04:36:42 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-12-03 14:25:20 from Florian Weimer <fweimer(at)bfk(dot)de>
2010-11-30 16:27:30 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-11-30 16:10:13 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-11-30 16:30:53 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-11-30 16:37:13 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-11-30 13:18:12 from Rob Wultsch <wultsch(at)gmail(dot)com>
2011-01-05 20:22:54 from Jesper Krogh <jesper(at)krogh(dot)cc>
2011-01-06 02:10:15 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-01-06 07:00:29 from Jesper Krogh <jesper(at)krogh(dot)cc>
2011-01-07 18:28:54 from Jim Nasby <jim(at)nasby(dot)net>
2011-01-08 02:59:36 from Robert Haas <robertmhaas(at)gmail(dot)com>
Lists:
pgsql-hackers
On 01.12.2010 15:39, Bruce Momjian wrote:
> Heikki Linnakangas wrote:
>> On 01.12.2010 03:35, Bruce Momjian wrote:
>>> Heikki Linnakangas wrote:
>>>> Let's recap what happens when a VM bit is set: You set the
>>>> PD_ALL_VISIBLE flag on the heap page (assuming it's not set already, it
>>>> usually isn't), and then set the bit in the VM while keeping the heap
>>>> page locked.
>>>
>>> What if we set PD_ALL_VISIBLE on the heap page, wait for a checkpoint to
>>> happen so the heap page is guaranteed to be on disk, then on next read,
>>> if PD_ALL_VISIBLE is set and the VM all-visible bit is not set, set the
>>> VM bit.
>>
>> Hmm, you'd somehow have to know if a checkpoint has happened since the
>> flag was set. And it might be a long wait, which makes it less
>
> Well, doesn't the page LSN tell you that already?
If we update the LSN when we set the flag, then we have to write the
full-page-image. That's very expensive. If we don't update the LSN, then
the LSN says nothing about when the flag was set.
>> attractive for index-only scans.
>
> My assumption is that this page will remain read-only for a while, so I
> don't see the big downside in a delay of max 5-10 minutes. For sites
> where pages go frequently in and out of read-only status, I don't think
> index-only scans are every going to be a big win. Long-running queries
> alone are going to delay how quickly we can set PD_ALL_VISIBLE, so I
> don't see an additional 5-10 minutes as a big problem.
Perhaps we could live with it, but it would be annoying to have to
checkpoint after a data load, before index-only scans kick in.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
In response to
Responses
pgsql-hackers by date
Next :From: Radosław SmoguraDate: 2010-12-01 13:59:39
Subject : Re: [HACKERS] Improved JDBC driver part 2
Previous :From : Robert HaasDate : 2010-12-01 13:50:36
Subject : Re: We really ought to do something about O_DIRECT and
data=journalled on ext4