From: | ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Notification when freespaces empty |
Date: | 2005-05-20 05:41:51 |
Message-ID: | 20050520144008.3C92.ITAGAKI.TAKAHIRO@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello all,
I think that this patch is useful to decide when to vacuum.
It notifies when freespace empties as follows:
$ ./pgbench -i
$ ./pgbench -n -t 1000
LOG: FreeSpace for "public.accounts" becomes empty. (stored=1, avg=159, min=128)
LOG: FreeSpace for "public.tellers" becomes empty. (stored=1, avg=238, min=40)
LOG: FreeSpace for "public.branches" becomes empty. (stored=1, avg=238, min=36)
$ vacuumdb
VACUUM
$ ./pgbench -n -t 2000
LOG: FreeSpace for "public.history" becomes empty. (stored=1, avg=208, min=52)
LOG: FreeSpace for "public.accounts" becomes empty. (stored=758, avg=159, min=128)
LOG: FreeSpace for "public.branches" becomes empty. (stored=5, avg=191, min=36)
LOG: FreeSpace for "public.tellers" becomes empty. (stored=6, avg=184, min=40)
Furthermore, this patch detaches empty fsmpages then.
Freespaces keep being scanned after they empties,
but it seems to be bootless effort.
Is this useful?
---
ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>
NTT Cyber Space Laboratories
Nippon Telegraph and Telephone Corporation.
Attachment | Content-Type | Size |
---|---|---|
freespace.diff | application/octet-stream | 5.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Berend Tober | 2005-05-20 07:49:31 | Re: Inherited constraints and search paths (was Re: Preserving |
Previous Message | Tom Lane | 2005-05-20 03:27:18 | Inherited constraints and search paths (was Re: Preserving data after updates) |