Re: [PATCHES] pg_freespacemap question

From: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, alvherre(at)commandprompt(dot)com, peter_e(at)gmx(dot)net, pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [PATCHES] pg_freespacemap question
Date: 2006-03-13 01:51:24
Message-ID: 4414D01C.6050205@paradise.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
>>Tatsuo Ishii wrote:
>>
>>>BTW, I noticed difference of outputs from pg_freespacemap and
>>>pgstattuple.
>>>
>>>I ran pgbench and inspected "accounts" table by using these tools.
>>>
>>>pg_freespacemap:
>>>sum of bytes: 250712
>>>
>>>pgstattuple:
>>>free_space: 354880
>>>
>>>Shouldn't they be identical?
>
>
> vacuum/fsm disregard pages with "uselessly small" amounts of
> free space (less than the average tuple size, IIRC).

Ah - that what I was seeing! Thanks.
>
> I do notice a rather serious shortcoming of pg_freespacemap in its
> current incarnation, which is that it *only* shows you the per-page free
> space data, and not any of the information that would let you determine
> what the FSM is doing to filter the raw data. The per-relation
> avgRequest and lastPageCount fields would be interesting for instance.
> Perhaps there should be a second view with one row per relation to
> carry the appropriate data.
>

Ok - I did wonder about 2 views, but was unsure if the per-relation
stuff was interesting. Given that it looks like it is interesting, I'll
see about getting a second view going.

Cheers

Mark

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2006-03-13 02:56:37 Re: [PATCHES] pg_freespacemap question
Previous Message Tom Lane 2006-03-13 00:43:11 Re: [PATCHES] pg_freespacemap question

Browse pgsql-patches by date

  From Date Subject
Next Message Tatsuo Ishii 2006-03-13 02:56:37 Re: [PATCHES] pg_freespacemap question
Previous Message Tom Lane 2006-03-13 00:43:11 Re: [PATCHES] pg_freespacemap question