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

Commit4dd3087

Browse files
committed
Remove assertion checking query ID in execMain.c
This assertion has been added by24f5205, but Alexander Lakhin hasproved that the ExecutorRun() one can be broken by using a PL functionthat manipulates compute_query_id and track_activities, while the onesin ExecutorFinish() and ExecutorEnd() could be triggered when cleaningup portals at the beginning of a new query execution.Discussion:https://postgr.es/m/b37d8e6c-e83d-e157-8865-1b2460a6aef2@gmail.com
1 parent259a0a9 commit4dd3087

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

‎src/backend/executor/execMain.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,6 @@ ExecutorEnd_hook_type ExecutorEnd_hook = NULL;
7171
/* Hook for plugin to get control in ExecCheckPermissions() */
7272
ExecutorCheckPerms_hook_typeExecutorCheckPerms_hook=NULL;
7373

74-
/*
75-
* Check that the query ID is set, which is something that happens only
76-
* if compute_query_id is enabled (or a module forced it), if track_activities
77-
* is enabled, and if a client provided a query string to map with the query
78-
* ID computed from it.
79-
*/
80-
#defineEXEC_CHECK_QUERY_ID \
81-
do { \
82-
Assert(!IsQueryIdEnabled() || !pgstat_track_activities ||\
83-
!debug_query_string || pgstat_get_my_query_id() != 0);\
84-
} while(0)
85-
8674
/* decls for local routines only used within this module */
8775
staticvoidInitPlan(QueryDesc*queryDesc,inteflags);
8876
staticvoidCheckValidRowMarkRel(Relationrel,RowMarkTypemarkType);
@@ -308,9 +296,6 @@ ExecutorRun(QueryDesc *queryDesc,
308296
ScanDirectiondirection,uint64count,
309297
boolexecute_once)
310298
{
311-
/* If enabled, the query ID should be set. */
312-
EXEC_CHECK_QUERY_ID;
313-
314299
if (ExecutorRun_hook)
315300
(*ExecutorRun_hook) (queryDesc,direction,count,execute_once);
316301
else
@@ -419,9 +404,6 @@ standard_ExecutorRun(QueryDesc *queryDesc,
419404
void
420405
ExecutorFinish(QueryDesc*queryDesc)
421406
{
422-
/* If enabled, the query ID should be set. */
423-
EXEC_CHECK_QUERY_ID;
424-
425407
if (ExecutorFinish_hook)
426408
(*ExecutorFinish_hook) (queryDesc);
427409
else
@@ -482,9 +464,6 @@ standard_ExecutorFinish(QueryDesc *queryDesc)
482464
void
483465
ExecutorEnd(QueryDesc*queryDesc)
484466
{
485-
/* If enabled, the query ID should be set. */
486-
EXEC_CHECK_QUERY_ID;
487-
488467
if (ExecutorEnd_hook)
489468
(*ExecutorEnd_hook) (queryDesc);
490469
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp