From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | tableam: abstracting relation sizing code |
Date: | 2019-06-06 20:40:53 |
Message-ID: | CA+TgmoZ6DBPnP1E-vRpQZUJQijJFD54F+SR_pxGiAAS-MyrigA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
It looks to me as though any table AM that uses the relation forks
supported by PostgreSQL in a more or less normal manner is likely to
require an implementation of the relation_size callback that is
identical to the one for heap, and an implementation of the
estimate_rel_size method that is extremely similar to the one for
heap. The latter is especially troubling as the amount of code
duplication is non-trivial, and it's full of special hacks.
Here is a patch that tries to improve the situation. I don't know
whether there is some better approach; this seemed like the obvious
thing to do.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment | Content-Type | Size |
---|---|---|
0001-tableam-Provide-helper-functions-for-relation-sizing.patch | application/octet-stream | 14.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Goel, Dhruv | 2019-06-06 22:13:14 | Re: Avoiding deadlock errors in CREATE INDEX CONCURRENTLY |
Previous Message | Tomas Vondra | 2019-06-06 20:33:08 | Re: Multivariate MCV stats can leak data to unprivileged users |