Commit 17d8beb4 authored by Teodor Sigaev's avatar Teodor Sigaev

Remove unused vars and mark assert-only vars

Kyotaro HORIGUCHI
parent a02d51c0
...@@ -85,7 +85,7 @@ void ...@@ -85,7 +85,7 @@ void
_bt_upgrademetapage(Page page) _bt_upgrademetapage(Page page)
{ {
BTMetaPageData *metad; BTMetaPageData *metad;
BTPageOpaque metaopaque; BTPageOpaque metaopaque PG_USED_FOR_ASSERTS_ONLY;
metad = BTPageGetMeta(page); metad = BTPageGetMeta(page);
metaopaque = (BTPageOpaque) PageGetSpecialPointer(page); metaopaque = (BTPageOpaque) PageGetSpecialPointer(page);
...@@ -118,7 +118,6 @@ _bt_update_meta_cleanup_info(Relation rel, TransactionId oldestBtpoXact, ...@@ -118,7 +118,6 @@ _bt_update_meta_cleanup_info(Relation rel, TransactionId oldestBtpoXact,
{ {
Buffer metabuf; Buffer metabuf;
Page metapg; Page metapg;
BTPageOpaque metaopaque;
BTMetaPageData *metad; BTMetaPageData *metad;
bool needsRewrite = false; bool needsRewrite = false;
XLogRecPtr recptr; XLogRecPtr recptr;
...@@ -126,7 +125,6 @@ _bt_update_meta_cleanup_info(Relation rel, TransactionId oldestBtpoXact, ...@@ -126,7 +125,6 @@ _bt_update_meta_cleanup_info(Relation rel, TransactionId oldestBtpoXact,
/* read the metapage and check if it needs rewrite */ /* read the metapage and check if it needs rewrite */
metabuf = _bt_getbuf(rel, BTREE_METAPAGE, BT_READ); metabuf = _bt_getbuf(rel, BTREE_METAPAGE, BT_READ);
metapg = BufferGetPage(metabuf); metapg = BufferGetPage(metabuf);
metaopaque = (BTPageOpaque) PageGetSpecialPointer(metapg);
metad = BTPageGetMeta(metapg); metad = BTPageGetMeta(metapg);
/* outdated version of metapage always needs rewrite */ /* outdated version of metapage always needs rewrite */
......
...@@ -786,13 +786,11 @@ _bt_vacuum_needs_cleanup(IndexVacuumInfo *info) ...@@ -786,13 +786,11 @@ _bt_vacuum_needs_cleanup(IndexVacuumInfo *info)
{ {
Buffer metabuf; Buffer metabuf;
Page metapg; Page metapg;
BTPageOpaque metaopaque;
BTMetaPageData *metad; BTMetaPageData *metad;
bool result = false; bool result = false;
metabuf = _bt_getbuf(info->index, BTREE_METAPAGE, BT_READ); metabuf = _bt_getbuf(info->index, BTREE_METAPAGE, BT_READ);
metapg = BufferGetPage(metabuf); metapg = BufferGetPage(metabuf);
metaopaque = (BTPageOpaque) PageGetSpecialPointer(metapg);
metad = BTPageGetMeta(metapg); metad = BTPageGetMeta(metapg);
if (metad->btm_version < BTREE_VERSION) if (metad->btm_version < BTREE_VERSION)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment