Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Notification when freespaces empty



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.takahiro@lab.ntt.co.jp>
NTT Cyber Space Laboratories
Nippon Telegraph and Telephone Corporation.

Attachment: freespace.diff
Description: Binary data



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group