mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +03:00
Update types in smgr API
Change data buffer to void *, from char *, and add const where
appropriate. This makes it match the File API (see also
2d4f1ba6cf
) and stdio.
Discussion: https://www.postgresql.org/message-id/flat/11dda853-bb5b-59ba-a746-e168b1ce4bdb%40enterprisedb.com
This commit is contained in:
@@ -165,7 +165,7 @@ btbuildempty(Relation index)
|
||||
*/
|
||||
PageSetChecksumInplace(metapage, BTREE_METAPAGE);
|
||||
smgrwrite(RelationGetSmgr(index), INIT_FORKNUM, BTREE_METAPAGE,
|
||||
(char *) metapage, true);
|
||||
metapage, true);
|
||||
log_newpage(&RelationGetSmgr(index)->smgr_rlocator.locator, INIT_FORKNUM,
|
||||
BTREE_METAPAGE, metapage, true);
|
||||
|
||||
|
@@ -664,7 +664,7 @@ _bt_blwritepage(BTWriteState *wstate, Page page, BlockNumber blkno)
|
||||
/* don't set checksum for all-zero page */
|
||||
smgrextend(RelationGetSmgr(wstate->index), MAIN_FORKNUM,
|
||||
wstate->btws_pages_written++,
|
||||
(char *) wstate->btws_zeropage,
|
||||
wstate->btws_zeropage,
|
||||
true);
|
||||
}
|
||||
|
||||
@@ -678,14 +678,14 @@ _bt_blwritepage(BTWriteState *wstate, Page page, BlockNumber blkno)
|
||||
{
|
||||
/* extending the file... */
|
||||
smgrextend(RelationGetSmgr(wstate->index), MAIN_FORKNUM, blkno,
|
||||
(char *) page, true);
|
||||
page, true);
|
||||
wstate->btws_pages_written++;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* overwriting a block we zero-filled before */
|
||||
smgrwrite(RelationGetSmgr(wstate->index), MAIN_FORKNUM, blkno,
|
||||
(char *) page, true);
|
||||
page, true);
|
||||
}
|
||||
|
||||
pfree(page);
|
||||
|
Reference in New Issue
Block a user