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

Commit8876e37

Browse files
committed
Reduce size of critial section during vacuum full, critical
sections now isn't nested. All user-defined functions now iscalled outside critsections. Small improvements in WALprotocol.TODO: improve XLOG replay
1 parent815f584 commit8876e37

File tree

5 files changed

+403
-246
lines changed

5 files changed

+403
-246
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/gist/gist.c,v 1.134 2006/05/10 23:18:38 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/gist/gist.c,v 1.135 2006/05/17 16:34:59 teodor Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -347,7 +347,7 @@ gistplacetopage(GISTInsertState *state, GISTSTATE *giststate)
347347
* Form index tuples vector to split:
348348
* remove old tuple if t's needed and add new tuples to vector
349349
*/
350-
itvec=gistextractbuffer(state->stack->buffer,&tlen);
350+
itvec=gistextractpage(state->stack->page,&tlen);
351351
if ( !is_leaf ) {
352352
/* on inner page we should remove old tuple */
353353
intpos=state->stack->childoffnum-FirstOffsetNumber;
@@ -501,7 +501,7 @@ gistplacetopage(GISTInsertState *state, GISTSTATE *giststate)
501501
}
502502

503503
rdata=formUpdateRdata(state->r->rd_node,state->stack->buffer,
504-
offs,noffs,false,
504+
offs,noffs,
505505
state->itup,state->ituplen,
506506
&(state->key));
507507

@@ -1157,7 +1157,7 @@ gistnewroot(Relation r, Buffer buffer, IndexTuple *itup, int len, ItemPointer ke
11571157
XLogRecData*rdata;
11581158

11591159
rdata=formUpdateRdata(r->rd_node,buffer,
1160-
NULL,0, false,
1160+
NULL,0,
11611161
itup,len,key);
11621162

11631163
recptr=XLogInsert(RM_GIST_ID,XLOG_GIST_NEW_ROOT,rdata);

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
*$PostgreSQL: pgsql/src/backend/access/gist/gistutil.c,v 1.11 2006/05/10 09:19:54 teodor Exp $
11+
*$PostgreSQL: pgsql/src/backend/access/gist/gistutil.c,v 1.12 2006/05/17 16:34:59 teodor Exp $
1212
*-------------------------------------------------------------------------
1313
*/
1414
#include"postgres.h"
@@ -112,18 +112,17 @@ gistfitpage(IndexTuple *itvec, int len) {
112112
* Read buffer into itup vector
113113
*/
114114
IndexTuple*
115-
gistextractbuffer(Bufferbuffer,int*len/* out */ )
115+
gistextractpage(Pagepage,int*len/* out */ )
116116
{
117117
OffsetNumberi,
118118
maxoff;
119119
IndexTuple*itvec;
120-
Pagep= (Page)BufferGetPage(buffer);
121120

122-
maxoff=PageGetMaxOffsetNumber(p);
121+
maxoff=PageGetMaxOffsetNumber(page);
123122
*len=maxoff;
124123
itvec=palloc(sizeof(IndexTuple)*maxoff);
125124
for (i=FirstOffsetNumber;i <=maxoff;i=OffsetNumberNext(i))
126-
itvec[i-FirstOffsetNumber]= (IndexTuple)PageGetItem(p,PageGetItemId(p,i));
125+
itvec[i-FirstOffsetNumber]= (IndexTuple)PageGetItem(page,PageGetItemId(page,i));
127126

128127
returnitvec;
129128
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp