Re: [PATCH] Query Jumbling for CALL and SET utility statements
Jeremy Schneider <schnjere@amazon.com>
From: Jeremy Schneider <schnjere@amazon.com>
To: "Drouvot, Bertrand" <bdrouvot@amazon.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Pavel Stehule <pavel.stehule@gmail.com>, Andres Freund <andres@anarazel.de>, "Imseih (AWS),
Sami" <simseih@amazon.com>
Date: 2022-09-08T01:19:42Z
Lists: pgsql-hackers
On 9/2/22 2:06 AM, Drouvot, Bertrand wrote: > v3 including this change is attached. FYI: "reset all" core dumps with v3 I didn't fully debug yet, but here's the backtrace on my 14.4 build with the patch [postgres@ip-172-31-44-176 data]$ gdb /usr/local/pgsql-14.4/bin/postgres core.27217 ... Core was generated by `postgres: postgres postgres [local] RESET '. Program terminated with signal 11, Segmentation fault. #0 0x00007f7776ae4821 in __strlen_sse2_pminub () from /lib64/libc.so.6 ... (gdb) bt #0 0x00007f7776ae4821 in __strlen_sse2_pminub () from /lib64/libc.so.6 #1 0x00000000008e061c in JumbleExpr (jstate=0x1cf7f80, node=<optimized out>) at queryjumble.c:400 #2 0x00000000008dfdd8 in JumbleQueryInternal (jstate=0x1cf7f80, query=0x1cf7e70) at queryjumble.c:247 #3 0x00000000008e0b4b in JumbleQuery (query=query@entry=0x1cf7e70, querytext=querytext@entry=0x1cf72f8 "reset all;") at queryjumble.c:127 #4 0x000000000056ba4b in parse_analyze (parseTree=0x1cf7ce0, sourceText=0x1cf72f8 "reset all;", paramTypes=0x0, numParams=<optimized out>, queryEnv=0x0) at analyze.c:130 #5 0x000000000079df63 in pg_analyze_and_rewrite (parsetree=parsetree@entry=0x1cf7ce0, query_string=query_string@entry=0x1cf72f8 "reset all;", paramTypes=paramTypes@entry=0x0, numParams=numParams@entry=0, queryEnv=queryEnv@entry=0x0) at postgres.c:657 #6 0x000000000079e472 in exec_simple_query (query_string=0x1cf72f8 "reset all;") at postgres.c:1130 #7 0x000000000079f9d3 in PostgresMain (argc=argc@entry=1, argv=argv@entry=0x7ffd0c341f80, dbname=0x1d44948 "postgres", username=<optimized out>) at postgres.c:4496 #8 0x000000000048c9f3 in BackendRun (port=<optimized out>, port=<optimized out>) at postmaster.c:4530 #9 BackendStartup (port=0x1d3bdd0) at postmaster.c:4252 #10 ServerLoop () at postmaster.c:1745 #11 0x0000000000721332 in PostmasterMain (argc=argc@entry=5, argv=argv@entry=0x1cf1e10) at postmaster.c:1417 #12 0x000000000048da6e in main (argc=5, argv=0x1cf1e10) at main.c:209 -- Jeremy Schneider Database Engineer Amazon Web Services
Commits
-
Show values of SET statements as constants in pg_stat_statements
- dc68515968e8 18.0 landed
-
Teach contrib/pg_stat_statements to handle multi-statement commands better.
- 83f2061dd037 10.0 cited