Re: crash-safe visibility map, take three - Mailing list pgsql-hackers

From Robert Haas
Subject Re: crash-safe visibility map, take three
Date
Msg-id AANLkTinVXHXSi0Bgtz5_WHPnOqGcZj_DT6cB2c2_HS3Z@mail.gmail.com
Whole thread Raw
In response to Re: crash-safe visibility map, take three  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: crash-safe visibility map, take three
List pgsql-hackers
On Tue, Nov 30, 2010 at 11:22 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Tue, Nov 30, 2010 at 11:16 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> How much is "quite a lot"?  Do we have any real reason to think that
>> this solution is unacceptable performance-wise?
>
> Well, let's imagine a 1GB insert-only table.  It has 128K pages.  If
> you XLOG setting the bit on each page, you'll need to write 128K WAL
> records, each containing a 12-byte relfilenode and a 4-byte block
> offset, for a total of 16 bytes of WAL per page, thus 2MB of WAL.
>
> But you did just dirty a gigabyte of data.

Oh, but it's worse than that.  When you XLOG a WAL record for each of
those pages, you're going to trigger full-page writes for all of them.So now you've turned 1GB of data to write into 2+
GBof data to 
write.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [GENERAL] column-level update privs + lock table
Next
From: Heikki Linnakangas
Date:
Subject: Re: crash-safe visibility map, take three