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

Commit9c4eceb

Browse files
committed
Fix for vacuum updating problem.
1 parent5fbbd36 commit9c4eceb

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

‎src/backend/commands/vacuum.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.70 1998/08/1902:01:56 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.71 1998/08/1915:47:35 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -39,6 +39,7 @@
3939
#include"storage/bufpage.h"
4040
#include"storage/shmem.h"
4141
#include"storage/smgr.h"
42+
#include"storage/itemptr.h"
4243
#include"storage/lmgr.h"
4344
#include"utils/builtins.h"
4445
#include"utils/inval.h"
@@ -1883,13 +1884,11 @@ vc_updstats(Oid relid, int npages, int ntups, bool hasindex, VRelStats *vacrelst
18831884
}
18841885

18851886
/* XXX -- after write, should invalidate relcache in other backends */
1886-
#ifdefNOT_USED
1887-
WriteNoReleaseBuffer(&rtup->t_ctid);/* heap_endscan release scan' buffers ? */
1888-
#endif
1887+
WriteNoReleaseBuffer(ItemPointerGetBlockNumber(&rtup->t_ctid));
18891888

18901889
/*
18911890
* invalidating system relations confuses the function cache of
1892-
* pg_operator and pg_opclass
1891+
* pg_operator and pg_opclass, bjm
18931892
*/
18941893
if (!IsSystemRelationName(pgcform->relname.data))
18951894
RelationInvalidateHeapTuple(rd,rtup);

‎src/backend/executor/nodeIndexscan.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.24 1998/08/1902:02:02 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.25 1998/08/1915:47:36 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -129,7 +129,7 @@ IndexNext(IndexScan *node)
129129
{
130130
boolprev_matches= false;
131131
intprev_index;
132-
132+
133133
/* ----------------
134134
*store the scanned tuple in the scan tuple slot of
135135
*the scan state. Eventually we will only do this and not
@@ -142,10 +142,17 @@ IndexNext(IndexScan *node)
142142
slot,/* slot to store in */
143143
buffer,/* buffer associated with tuple */
144144
false);/* don't pfree */
145-
145+
146+
/*
147+
*We must check to see if the current tuple would have been
148+
*matched by an earlier index, so we don't double report it.
149+
*We do this by passing the tuple through ExecQual and look
150+
*for failure with all previous qualifications.
151+
*/
146152
for (prev_index=0;prev_index<indexstate->iss_IndexPtr;
147153
prev_index++)
148154
{
155+
scanstate->cstate.cs_ExprContext->ecxt_scantuple=slot;
149156
if (ExecQual(nth(prev_index,node->indxqual),
150157
scanstate->cstate.cs_ExprContext))
151158
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp