From: | torikoshia <torikoshia(at)oss(dot)nttdata(dot)com> |
---|---|
To: | Rafael Thofehrn Castro <rafaelthca(at)gmail(dot)com>, robertmhaas(at)gmail(dot)com |
Cc: | Andrei Lepikhov <lepihov(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Proposal: Progressive explain |
Date: | 2025-03-31 00:23:38 |
Message-ID: | b67d2e9406bc307798170a21dfefe467@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Mar 7, 2025 at 6:43 AM Rafael Thofehrn Castro
<rafaelthca(at)gmail(dot)com> wrote:
> The wrapper code was implemented by torikoshia
> (torikoshia(at)oss(dot)nttdata(dot)com),
> so adding the credits here.
On Thu, Mar 20, 2025 at 5:35 AM Robert Haas <robertmhaas(at)gmail(dot)com>
wrote:
> Without having the prior discussion near to hand, I *think* that the
> reason we wanted to do this wrap/unwrap stuff is to make it so that
> the progressive EXPLAIN code could only execute when entering a new
> plan node rather than at any random point inside of that plan node,
> and that does seem a lot safer than the alternative.
Your assumption is correct. Various approaches were suggested, such as
picking a small number of safe and sufficient places for this feature or
classifying CFI() calls into safe and unsafe ones. However, in the end,
the wrapping approach [1] was the only one that remained
On 2025-03-30 02:51, Rafael Thofehrn Castro wrote:
> Implemented this version. New patch has the following characteristics:
I haven't looked into the code yet, but when I ran below commands during
make installcheck, there was an error and an assertion failure
=# select * from pg_stat_progress_explain;
=# \watch 0.1
ERROR: could not attach to dynamic shared area
WARNING: terminating connection because of crash of another server
process
DETAIL: The postmaster has commanded this server process to roll back
the current transaction and exit, because another server process exited
abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and
repeat your command.
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
The connection to the server was lost. Attempting reset: Failed.
TRAP: failed Assert("param->paramkind == PARAM_EXTERN"), File:
"ruleutils.c", Line: 8802, PID: 73180
TRAP: failed Assert("param->paramkind == PARAM_EXTERN"), File:
"ruleutils.c", Line: 8802, PID: 73181
0 postgres 0x000000010365f5c4
ExceptionalCondition + 236
1 postgres 0x00000001035a7830
get_parameter + 1076
0 postgres 0x000000010365f5c4
ExceptionalCondition + 236
2 postgres 0x000000010359ff2c
get_rule_expr + 276
1 postgres 0x00000001035a7830
get_parameter + 1076
3 postgres 0x00000001035a841c
get_rule_expr_paren + 168
2 postgres 0x000000010359ff2c
get_rule_expr + 276
4 postgres 0x00000001035a82c4
get_oper_expr + 292
3 postgres 0x00000001035a841c
get_rule_expr_paren + 168
5 postgres 0x00000001035a01f8
get_rule_expr + 992
4 postgres 0x00000001035a82c4
get_oper_expr + 292
6 postgres 0x0000000103598520
deparse_expression_pretty + 176
5 postgres 0x00000001035a01f8
get_rule_expr + 992
7 postgres 0x0000000103598e78
deparse_expression + 76
6 postgres 0x0000000103598520
deparse_expression_pretty + 176
8 postgres 0x0000000102f94198
show_expression + 100
7 postgres 0x0000000103598e78
deparse_expression + 76
9 postgres 0x0000000102f97690 show_qual +
112
8 postgres 0x0000000102f94198
show_expression + 100
10 postgres 0x0000000102f93734
show_scan_qual + 132
9 postgres 0x0000000102f97690 show_qual +
112
TRAP: failed Assert("param->paramkind == PARAM_EXTERN"), File:
"ruleutils.c", Line: 8802, PID: 73183
11 postgres 0x0000000102f90680 ExplainNode
+ 6828
10 postgres 0x0000000102f93734
show_scan_qual + 132
12 postgres 0x0000000102f8d398
ExplainPrintPlan + 540
0 postgres 0x000000010365f5c4
ExceptionalCondition + 236
11 postgres 0x0000000102f90680 ExplainNode
+ 6828
13 postgres 0x0000000102f9b974
ProgressiveExplainPrint + 72
12 postgres 0x0000000102f8d398
ExplainPrintPlan + 540
1 postgres 0x00000001035a7830
get_parameter + 1076
14 postgres 0x0000000102f9b920
ProgressiveExplainStart + 660
13 postgres 0x0000000102f9b974
ProgressiveExplainPrint + 72
2 postgres 0x000000010359ff2c
get_rule_expr + 276
15 postgres 0x00000001030771e0
standard_ExecutorStart + 984
14 postgres 0x0000000102f9b920
ProgressiveExplainStart + 660
3 postgres 0x00000001035a841c
get_rule_expr_paren + 168
16 postgres 0x0000000103076de8
ExecutorStart + 112
15 postgres 0x00000001030771e0
standard_ExecutorStart + 984
4 postgres 0x00000001035a82c4
get_oper_expr + 292
17 postgres 0x0000000103080d90
ParallelQueryMain + 292
16 postgres 0x0000000103076de8
ExecutorStart + 112
5 postgres 0x00000001035a01f8
get_rule_expr + 992
18 postgres 0x0000000102df7ef8
ParallelWorkerMain + 1712
17 postgres 0x0000000103080d90
ParallelQueryMain + 292
6 postgres 0x0000000103598520
deparse_expression_pretty + 176
19 postgres 0x00000001032a5d60
BackgroundWorkerMain + 824
18 postgres 0x0000000102df7ef8
ParallelWorkerMain + 1712
7 postgres 0x0000000103598e78
deparse_expression + 76
20 postgres 0x00000001032a9ee8
postmaster_child_launch + 492
19 postgres 0x00000001032a5d60
BackgroundWorkerMain + 824
8 postgres 0x0000000102f94198
show_expression + 100
21 postgres 0x00000001032b4c10
StartBackgroundWorker + 416
20 postgres 0x00000001032a9ee8
postmaster_child_launch + 492
9 postgres 0x0000000102f97690 show_qual +
112
22 postgres 0x00000001032af9d8
maybe_start_bgworkers + 552
21 postgres 0x00000001032b4c10
StartBackgroundWorker + 416
10 postgres 0x0000000102f93734
show_scan_qual + 132
23 postgres 0x00000001032b26cc
LaunchMissingBackgroundProcesses + 1316
22 postgres 0x00000001032af9d8
maybe_start_bgworkers + 552
11 postgres 0x0000000102f90680 ExplainNode
+ 6828
24 postgres 0x00000001032afcb0 ServerLoop
+ 616
23 postgres 0x00000001032b26cc
LaunchMissingBackgroundProcesses + 1316
12 postgres 0x0000000102f8d398
ExplainPrintPlan + 540
25 postgres 0x00000001032ae55c
PostmasterMain + 6632
13 postgres 0x0000000102f9b974
ProgressiveExplainPrint + 72
24 postgres 0x00000001032afcb0 ServerLoop
+ 616
25 postgres 0x00000001032ae55c
PostmasterMain + 6632
26 postgres 0x0000000103121160 main + 952
27 dyld 0x000000019cdc0274 start +
2840
26 postgres 0x0000000103121160 main + 952
27 dyld 0x000000019cdc0274 start +
2840
TRAP: failed Assert("param->paramkind == PARAM_EXTERN"), File:
"ruleutils.c", Line: 8802, PID: 73182
[1]
https://www.postgresql.org/message-id/ac6c51071316279bf903078cf264c37a%40oss.nttdata.com
--
Atsushi Torikoshi
Seconded from NTT DATA GROUP CORPORATION to SRA OSS K.K.
From | Date | Subject | |
---|---|---|---|
Next Message | Alena Rybakina | 2025-03-31 02:33:49 | Re: Memoize ANTI and SEMI JOIN inner |
Previous Message | Andres Freund | 2025-03-30 23:46:57 | Re: AIO v2.5 |