| From: | "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com> |
|---|---|
| To: | <pgsql-patches(at)postgresql(dot)org> |
| Subject: | Index split WAL reduction |
| Date: | 2006-12-05 11:41:13 |
| Message-ID: | 45755AD9.1040503@enterprisedb.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
Hi,
Currently, an index split writes all the data on the split page to WAL.
That's a lot of WAL traffic. The tuples that are copied to the right
page need to be WAL logged, but the tuples that stay on the original
page don't.
Here's a patch to do that. It needs further testing, I have used the
attached crude crashtest.sh to test the basics, but we need to test the
more obscure cases like splitting non-leaf or root page.
On a test case that inserts 10000 rows in increasing key order with a
100 characters wide text-field as key, the patch reduced the total
generated WAL traffic from 45MB to 33MB, or ~ 25%. Your mileage may
vary, depending on the tuple and key sizes, and the order of inserts.
Anyone see a problem with this?
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
| Attachment | Content-Type | Size |
|---|---|---|
| split_wal_reduction-5.patch | text/x-patch | 16.6 KB |
| crashtest.sh | application/x-shellscript | 3.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Teodor Sigaev | 2006-12-05 12:13:16 | Re: Bundle of patches |
| Previous Message | Michael Meskes | 2006-12-05 09:49:19 | Re: ECPG docs |