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:
钟承志
2024-05-08 15:33:12 +08:00
committed by yaoxin
parent b186cd1555
commit 16a41e491c
2 changed files with 10 additions and 0 deletions

View File

@ -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);

View File

@ -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),