From: | John Naylor <jcnaylor(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: WIP: Avoid creation of the free space map for small tables |
Date: | 2018-10-16 10:57:25 |
Message-ID: | CAJVSVGVtumVV-oo1XrwZ_dS2VHfjGgyRs_641LUDuoqyCqemaw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 10/15/18, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> I think you can avoid calling RelationGetNumberOfBlocks, if you call
> smgrexists before
This is done in the attached v5, 0001.
> and for the purpose of vacuum, we can get that as an
> input parameter. I think one can argue for not changing the interface
> functions like RecordPageWithFreeSpace to avoid calling
> RelationGetNumberOfBlocks, but to me, it appears worth to save the
> additional system call.
This is done in 0002. I also added a check for the cached value of
pg_class.relpages, since it's cheap and may help non-VACUUM callers.
> [proposal for a cache of blocks to try]
That's interesting. I'll have to do some reading elsewhere in the
codebase, and then I'll follow up.
Thanks,
-John Naylor
Attachment | Content-Type | Size |
---|---|---|
v5-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patch | text/x-patch | 17.5 KB |
v5-0002-Add-parameter-nblocks-to-RecordPageWithFreeSpace.patch | text/x-patch | 10.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Khandekar | 2018-10-16 11:04:41 | Re: TupleTableSlot abstraction |
Previous Message | Andrey Klychkov | 2018-10-16 08:28:17 | [PATCH] heap_insert() and heap_update() optimization |