Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

TableAM/PageInspect: Currently the function tries to inspect all storage options #25

Open
Eulerizeit opened this issue Jul 30, 2020 · 0 comments

Comments

@Eulerizeit
Copy link

if (blkno >= RelationGetNumberOfBlocksInFork(rel, forknum))
                ereport(ERROR,
                                (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
                                 errmsg("block number %u is out of range for relation \"%s\"",
                                                blkno, RelationGetRelationName(rel))));
        /* Initialize buffer to copy to */
        raw_page = (bytea *) palloc(BLCKSZ + VARHDRSZ);
        SET_VARSIZE(raw_page, BLCKSZ + VARHDRSZ);
        raw_page_data = VARDATA(raw_page);

Page inspect uses a generic interface but then makes assumptions about the storage for example getRowPage() using these where they don't make sense causes a crash.

This is for debugging, what the 'user' is interested in is the bit format.

Perhaps rather than extending page inspect we might want to create something separate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant