Re: [PATCHES] Big number of "unused" pages as reported by - Mailing list pgsql-hackers

From Zeugswetter Andreas SB SD
Subject Re: [PATCHES] Big number of "unused" pages as reported by
Date
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA4961E76@m0114.s-mxs.net
Whole thread Raw
List pgsql-hackers
> I make a guess I've got this due to parallel running of a program making
> bulk INSERTs/UPDATEs into that table. Mmm...I need a way to avoid the big
> number of unused pages in such a case. LOCK TABLE?

Only UPDATEs and DELETEs (and rolled back INSERTs) cause unused pages.
The trick for other people was to run very frequent 'VACUUM goods;'
(like every 15 seconds) on tables when relatively few rows (in small tables)
where constantly beeing updated (e.g. counters/balances).

It might be sufficient in your case though to do the 'VACUUM goods;' after
every bulk UPDATE, like Christopher suggested. A concurrent vacuum won't
help if each bulk update is done in one single transaction.

Andreas


pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: [PATCHES] Big number of "unused" pages as reported by VACUUM
Next
From: Curt Sampson
Date:
Subject: Re: Inheritance