On branch page
Your branch is up to date with 'origin/page'. Changes to be committed: modified: rawpage.cpp On branch page Your branch is up to date with 'origin/page'. Changes to be committed: modified: rawpage.cpp On branch page Your branch is up to date with 'origin/page'. Changes to be committed: modified: rawpage.cpp On branch page Your branch is up to date with 'origin/page'. Changes to be committed: modified: rawpage.cpp On branch page Your branch is up to date with 'origin/page'. Changes to be committed: modified: catalog.cpp On branch page Your branch is up to date with 'origin/page'. Changes to be committed: modified: catalog.cpp On branch page Your branch is up to date with 'origin/page'. Changes to be committed: modified: catalog.cpp On branch page Your branch is up to date with 'origin/page'. Changes to be committed: modified: catalog.cpp On branch page Your branch is up to date with 'origin/page'. Changes to be committed: modified: contrib/pageinspect/rawpage.cpp modified: src/common/backend/catalog/catalog.cpp
This commit is contained in:
@ -156,6 +156,12 @@ static bytea* get_raw_page_internal(text* relname, ForkNumber forknum, BlockNumb
|
||||
SET_VARSIZE(raw_page, BLCKSZ + VARHDRSZ);
|
||||
raw_page_data = VARDATA(raw_page);
|
||||
|
||||
if ((forknum == InvalidForkNumber) || (forknum > INIT_FORKNUM)) {
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
|
||||
errmsg("cannot get raw page from stream for Invlid forkname; Valid forknames are \"main\", \"fsm\", \"vm\", \"bcm\", \"init\"")));
|
||||
}
|
||||
|
||||
/* Take a verbatim copy of the page */
|
||||
|
||||
buf = ReadBufferExtended(rel, forknum, blkno, RBM_NORMAL, NULL);
|
||||
|
||||
@ -152,6 +152,10 @@ ForkNumber forkname_to_number(char* forkName, BlockNumber* segno)
|
||||
|
||||
subtoken = strtok_r(token, ".", &tmpsubtoken);
|
||||
Assert(subtoken != NULL);
|
||||
if (atooid(subtoken)) {
|
||||
return InvalidForkNumber;
|
||||
}
|
||||
|
||||
if (strlen(subtoken) == parselen) {
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
|
||||
Reference in New Issue
Block a user