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

Commit6de6d96

Browse files
committed
Invalidate caches after cranking up a parallel worker transaction.
Starting a parallel worker transaction changes our notion of which XIDsare in-progress or committed, and our notion of the current commandcounter ID. Therefore, our view of these caches prior to startingthis transaction may no longer valid. Defend against that by clearingthem.This fixes a bug in commit924bcf4.
1 parentd07fea5 commit6de6d96

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎src/backend/access/transam/parallel.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include"tcop/tcopprot.h"
2929
#include"utils/combocid.h"
3030
#include"utils/guc.h"
31+
#include"utils/inval.h"
3132
#include"utils/memutils.h"
3233
#include"utils/resowner.h"
3334
#include"utils/snapmgr.h"
@@ -928,6 +929,12 @@ ParallelWorkerMain(Datum main_arg)
928929
Assert(asnapspace!=NULL);
929930
PushActiveSnapshot(RestoreSnapshot(asnapspace));
930931

932+
/*
933+
* We've changed which tuples we can see, and must therefore invalidate
934+
* system caches.
935+
*/
936+
InvalidateSystemCaches();
937+
931938
/* Restore user ID and security context. */
932939
SetUserIdAndSecContext(fps->current_user_id,fps->sec_context);
933940

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp