Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit81c8c24

Browse files
committed
No more #ifdef XLOG.
1 parentb16516b commit81c8c24

36 files changed

+308
-3969
lines changed

‎src/backend/access/gist/gist.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.66 2000/11/21 21:15:53 petere Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.67 2000/11/30 08:46:20 vadim Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -23,9 +23,7 @@
2323
#include"miscadmin.h"
2424
#include"utils/syscache.h"
2525

26-
#ifdefXLOG
2726
#include"access/xlogutils.h"
28-
#endif
2927

3028
/* non-export function prototypes */
3129
staticInsertIndexResultgistdoinsert(Relationr,IndexTupleitup,
@@ -1348,7 +1346,6 @@ int_range_out(INTRANGE *r)
13481346

13491347
#endif/* defined GISTDEBUG */
13501348

1351-
#ifdefXLOG
13521349
void
13531350
gist_redo(XLogRecPtrlsn,XLogRecord*record)
13541351
{
@@ -1365,4 +1362,3 @@ void
13651362
gist_desc(char*buf,uint8xl_info,char*rec)
13661363
{
13671364
}
1368-
#endif

‎src/backend/access/hash/hash.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.45 2000/11/21 21:15:54 petere Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.46 2000/11/30 08:46:20 vadim Exp $
1212
*
1313
* NOTES
1414
* This file contains only the public interface routines.
@@ -27,9 +27,7 @@
2727

2828
boolBuildingHash= false;
2929

30-
#ifdefXLOG
3130
#include"access/xlogutils.h"
32-
#endif
3331

3432

3533
/*
@@ -482,7 +480,6 @@ hashdelete(PG_FUNCTION_ARGS)
482480
PG_RETURN_VOID();
483481
}
484482

485-
#ifdefXLOG
486483
void
487484
hash_redo(XLogRecPtrlsn,XLogRecord*record)
488485
{
@@ -499,4 +496,3 @@ void
499496
hash_desc(char*buf,uint8xl_info,char*rec)
500497
{
501498
}
502-
#endif

‎src/backend/access/heap/heapam.c

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.96 2000/11/21 21:15:54 petere Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.97 2000/11/30 08:46:20 vadim Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -86,7 +86,6 @@
8686
#include"utils/inval.h"
8787
#include"utils/relcache.h"
8888

89-
#ifdefXLOG
9089
#include"access/xlogutils.h"
9190

9291
XLogRecPtrlog_heap_move(Relationreln,ItemPointerDatafrom,HeapTuplenewtup);
@@ -99,8 +98,6 @@ static XLogRecPtr log_heap_update(Relation reln, ItemPointerData from,
9998

10099
staticvoidHeapPageCleanup(Bufferbuffer);
101100

102-
#endif
103-
104101

105102
/* ----------------------------------------------------------------
106103
* heap support routines
@@ -1370,7 +1367,6 @@ heap_insert(Relation relation, HeapTuple tup)
13701367
/* NO ELOG(ERROR) from here till changes are logged */
13711368
RelationPutHeapTuple(relation,buffer,tup);
13721369

1373-
#ifdefXLOG
13741370
/* XLOG stuff */
13751371
{
13761372
xl_heap_insertxlrec;
@@ -1392,7 +1388,6 @@ heap_insert(Relation relation, HeapTuple tup)
13921388
PageSetLSN(BufferGetPage(buffer),recptr);
13931389
PageSetSUI(BufferGetPage(buffer),ThisStartUpID);
13941390
}
1395-
#endif
13961391

13971392
LockBuffer(buffer,BUFFER_LOCK_UNLOCK);
13981393
WriteBuffer(buffer);
@@ -1485,7 +1480,6 @@ heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid)
14851480
returnresult;
14861481
}
14871482

1488-
#ifdefXLOG
14891483
/* XLOG stuff */
14901484
{
14911485
xl_heap_deletexlrec;
@@ -1500,7 +1494,6 @@ heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid)
15001494
PageSetLSN(dp,recptr);
15011495
PageSetSUI(dp,ThisStartUpID);
15021496
}
1503-
#endif
15041497

15051498
/* store transaction information of xact deleting the tuple */
15061499
TransactionIdStore(GetCurrentTransactionId(),&(tp.t_data->t_xmax));
@@ -1638,7 +1631,6 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
16381631
newbuf=buffer;
16391632
else
16401633
{
1641-
#ifdefXLOG
16421634
/*
16431635
* We have to unlock old tuple buffer before extending table
16441636
* file but have to keep lock on the old tuple. To avoid second
@@ -1650,7 +1642,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
16501642
_locked_tuple_.node=relation->rd_node;
16511643
_locked_tuple_.tid=*otid;
16521644
XactPushRollback(_heap_unlock_tuple, (void*)&_locked_tuple_);
1653-
#endif
1645+
16541646
TransactionIdStore(GetCurrentTransactionId(),&(oldtup.t_data->t_xmax));
16551647
oldtup.t_data->t_cmax=GetCurrentCommandId();
16561648
oldtup.t_data->t_infomask &= ~(HEAP_XMAX_COMMITTED |
@@ -1677,15 +1669,12 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
16771669
else
16781670
{
16791671
oldtup.t_data->t_infomask &= ~HEAP_XMAX_UNLOGGED;
1680-
#ifdefXLOG
16811672
XactPopRollback();
1682-
#endif
16831673
}
16841674

16851675
/* record address of new tuple in t_ctid of old one */
16861676
oldtup.t_data->t_ctid=newtup->t_self;
16871677

1688-
#ifdefXLOG
16891678
/* XLOG stuff */
16901679
{
16911680
XLogRecPtrrecptr=log_heap_update(relation,
@@ -1699,7 +1688,6 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
16991688
PageSetLSN(BufferGetPage(buffer),recptr);
17001689
PageSetSUI(BufferGetPage(buffer),ThisStartUpID);
17011690
}
1702-
#endif
17031691

17041692
if (newbuf!=buffer)
17051693
{
@@ -1791,13 +1779,11 @@ heap_mark4update(Relation relation, HeapTuple tuple, Buffer *buffer)
17911779
returnresult;
17921780
}
17931781

1794-
#ifdefXLOG
17951782
/*
17961783
* XLOG stuff: no logging is required as long as we have no
17971784
* savepoints. For savepoints private log could be used...
17981785
*/
17991786
((PageHeader)BufferGetPage(*buffer))->pd_sui=ThisStartUpID;
1800-
#endif
18011787

18021788
/* store transaction information of xact marking the tuple */
18031789
TransactionIdStore(GetCurrentTransactionId(),&(tuple->t_data->t_xmax));
@@ -1984,8 +1970,6 @@ heap_restrpos(HeapScanDesc scan)
19841970
}
19851971
}
19861972

1987-
#ifdefXLOG
1988-
19891973
staticXLogRecPtr
19901974
log_heap_update(Relationreln,ItemPointerDatafrom,
19911975
HeapTuplenewtup,boolmove)
@@ -2634,5 +2618,3 @@ heap_desc(char *buf, uint8 xl_info, char* rec)
26342618
else
26352619
strcat(buf,"UNKNOWN");
26362620
}
2637-
2638-
#endif/* XLOG */

‎src/backend/access/nbtree/nbtinsert.c

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.68 2000/11/16 05:50:58 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.69 2000/11/30 08:46:21 vadim Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -61,9 +61,7 @@ static void _bt_pgaddtup(Relation rel, Page page,
6161
staticbool_bt_isequal(TupleDescitupdesc,Pagepage,OffsetNumberoffnum,
6262
intkeysz,ScanKeyscankey);
6363

64-
#ifdefXLOG
6564
staticRelation_xlheapRel;/* temporary hack */
66-
#endif
6765

6866
/*
6967
*_bt_doinsert() -- Handle insertion of a single btitem in the tree.
@@ -123,9 +121,7 @@ _bt_doinsert(Relation rel, BTItem btitem,
123121
}
124122
}
125123

126-
#ifdefXLOG
127124
_xlheapRel=heapRel;/* temporary hack */
128-
#endif
129125

130126
/* do the insertion */
131127
res=_bt_insertonpg(rel,buf,stack,natts,itup_scankey,btitem,0);
@@ -522,7 +518,6 @@ _bt_insertonpg(Relation rel,
522518
}
523519
else
524520
{
525-
#ifdefXLOG
526521
/* XLOG stuff */
527522
{
528523
charxlbuf[sizeof(xl_btree_insert)+
@@ -562,7 +557,7 @@ _bt_insertonpg(Relation rel,
562557
PageSetLSN(page,recptr);
563558
PageSetSUI(page,ThisStartUpID);
564559
}
565-
#endif
560+
566561
_bt_pgaddtup(rel,page,itemsz,btitem,newitemoff,"page");
567562
itup_off=newitemoff;
568563
itup_blkno=BufferGetBlockNumber(buf);
@@ -612,10 +607,7 @@ _bt_split(Relation rel, Buffer buf, OffsetNumber firstright,
612607
rightoff;
613608
OffsetNumbermaxoff;
614609
OffsetNumberi;
615-
616-
#ifdefXLOG
617610
BTItemlhikey;
618-
#endif
619611

620612
rbuf=_bt_getbuf(rel,P_NEW,BT_WRITE);
621613
origpage=BufferGetPage(buf);
@@ -685,9 +677,7 @@ _bt_split(Relation rel, Buffer buf, OffsetNumber firstright,
685677
itemsz=ItemIdGetLength(itemid);
686678
item= (BTItem)PageGetItem(origpage,itemid);
687679
}
688-
#ifdefXLOG
689680
lhikey=item;
690-
#endif
691681
if (PageAddItem(leftpage, (Item)item,itemsz,leftoff,
692682
LP_USED)==InvalidOffsetNumber)
693683
elog(STOP,"btree: failed to add hikey to the left sibling");
@@ -775,7 +765,6 @@ _bt_split(Relation rel, Buffer buf, OffsetNumber firstright,
775765
spage=BufferGetPage(sbuf);
776766
}
777767

778-
#ifdefXLOG
779768
/*
780769
* Right sibling is locked, new siblings are prepared, but original
781770
* page is not updated yet. Log changes before continuing.
@@ -860,7 +849,6 @@ _bt_split(Relation rel, Buffer buf, OffsetNumber firstright,
860849
PageSetSUI(spage,ThisStartUpID);
861850
}
862851
}
863-
#endif
864852

865853
/*
866854
* By here, the original data page has been split into two new halves,
@@ -1165,19 +1153,13 @@ _bt_newroot(Relation rel, Buffer lbuf, Buffer rbuf)
11651153
BTItemitem;
11661154
Sizeitemsz;
11671155
BTItemnew_item;
1168-
1169-
#ifdefXLOG
11701156
Buffermetabuf;
1171-
#endif
11721157

11731158
/* get a new root page */
11741159
rootbuf=_bt_getbuf(rel,P_NEW,BT_WRITE);
11751160
rootpage=BufferGetPage(rootbuf);
11761161
rootblknum=BufferGetBlockNumber(rootbuf);
1177-
1178-
#ifdefXLOG
11791162
metabuf=_bt_getbuf(rel,BTREE_METAPAGE,BT_WRITE);
1180-
#endif
11811163

11821164
/* NO ELOG(ERROR) from here till newroot op is logged */
11831165

@@ -1237,7 +1219,6 @@ _bt_newroot(Relation rel, Buffer lbuf, Buffer rbuf)
12371219
elog(STOP,"btree: failed to add rightkey to new root page");
12381220
pfree(new_item);
12391221

1240-
#ifdefXLOG
12411222
/* XLOG stuff */
12421223
{
12431224
xl_btree_newrootxlrec;
@@ -1267,16 +1248,10 @@ _bt_newroot(Relation rel, Buffer lbuf, Buffer rbuf)
12671248

12681249
_bt_wrtbuf(rel,metabuf);
12691250
}
1270-
#endif
12711251

12721252
/* write and let go of the new root buffer */
12731253
_bt_wrtbuf(rel,rootbuf);
12741254

1275-
#ifndefXLOG
1276-
/* update metadata page with new root block number */
1277-
_bt_metaproot(rel,rootblknum,0);
1278-
#endif
1279-
12801255
/* update and release new sibling, and finally the old root */
12811256
_bt_wrtbuf(rel,rbuf);
12821257
_bt_wrtbuf(rel,lbuf);

‎src/backend/access/nbtree/nbtpage.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.41 2000/11/3001:39:06 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.42 2000/11/3008:46:21 vadim Exp $
1313
*
1414
*NOTES
1515
* Postgres btree pages look like ordinary relation pages.The opaque
@@ -170,7 +170,6 @@ _bt_getroot(Relation rel, int access)
170170
rootopaque= (BTPageOpaque)PageGetSpecialPointer(rootpage);
171171
rootopaque->btpo_flags |= (BTP_LEAF |BTP_ROOT);
172172

173-
#ifdefXLOG
174173
/* XLOG stuff */
175174
{
176175
xl_btree_newrootxlrec;
@@ -187,7 +186,6 @@ _bt_getroot(Relation rel, int access)
187186
PageSetLSN(metapg,recptr);
188187
PageSetSUI(metapg,ThisStartUpID);
189188
}
190-
#endif
191189

192190
metad->btm_root=rootblkno;
193191
metad->btm_level=1;
@@ -403,7 +401,6 @@ _bt_pagedel(Relation rel, ItemPointer tid)
403401
buf=_bt_getbuf(rel,blkno,BT_WRITE);
404402
page=BufferGetPage(buf);
405403

406-
#ifdefXLOG
407404
/* XLOG stuff */
408405
{
409406
xl_btree_deletexlrec;
@@ -417,7 +414,6 @@ _bt_pagedel(Relation rel, ItemPointer tid)
417414
PageSetLSN(page,recptr);
418415
PageSetSUI(page,ThisStartUpID);
419416
}
420-
#endif
421417

422418
PageIndexTupleDelete(page,offno);
423419

‎src/backend/access/nbtree/nbtree.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.71 2000/11/21 21:15:55 petere Exp $
15+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.72 2000/11/30 08:46:21 vadim Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -32,11 +32,8 @@ boolBuildingBtree = false;/* see comment in btbuild() */
3232
boolFastBuild= true;/* use sort/build instead of insertion
3333
* build */
3434

35-
#ifdefXLOG
3635
#include"access/xlogutils.h"
3736

38-
#endif
39-
4037
staticvoid_bt_restscan(IndexScanDescscan);
4138

4239
/*
@@ -733,8 +730,6 @@ _bt_restscan(IndexScanDesc scan)
733730
}
734731
}
735732

736-
#ifdefXLOG
737-
738733
staticbool
739734
_bt_cleanup_page(Pagepage,RelFileNodehnode)
740735
{
@@ -1529,5 +1524,3 @@ btree_desc(char *buf, uint8 xl_info, char* rec)
15291524
else
15301525
strcat(buf,"UNKNOWN");
15311526
}
1532-
1533-
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp