pg_hint_plan
pg_hint_plan copied to clipboard
[BUG]When using the plugin on PostgreSQL 10.6, I found that some operations will cause the database to crash
PostgreSQL: 10.6
pg_hint_plan: 1.3.1
When I use indexscan(a a.index_name), an error occurs in the database:
2021-11-02 17:38:46.079 CST,,,3954,,61810386.f72,3,,2021-11-02 17:23:18 CST,,0,LOG,00000,"received fast shutdown request",,,,,,,,,""
2021-11-02 17:38:46.083 CST,,,3954,,61810386.f72,4,,2021-11-02 17:23:18 CST,,0,LOG,00000,"aborting any active transactions",,,,,,,,,""
2021-11-02 17:38:46.083 CST,"postgres","test",5683,"10.251.134.63:55876",618103bc.1633,4,"idle",2021-11-02 17:24:12 CST,3/0,0,FATAL,57P01,"terminating connection due
to administrator command",,,,,,,,,"DBeaver 21.1.4 - SQLEditor <Script-5.sql>"
2021-11-02 17:38:46.084 CST,"postgres","test",5685,"10.251.134.63:55877",618103bc.1635,3,"idle",2021-11-02 17:24:12 CST,4/0,0,FATAL,57P01,"terminating connection due
to administrator command",,,,,,,,,"DBeaver 21.1.4 - Metadata
In addition, when I use indexscan(A INDEX_NAME), it is invalid.It seems to be case sensitive.
Hi,
"2021-11-02 17:38:46.079 CST,,3954,,61810386.f72,3,,2021-11-02 17:23:18 CST,,0,LOG,00000, "received fast shutdown request",,,,,,,,,""
So it looks like a normal shutdown of PostgreSQL, not a crash. Is someone, or some external tool, stopping PostgreSQL at that time? If the crash is caused by pg_hint_plan, you will probably see PANIC or SIGSEGV (signal 11) in the log. Were you getting any such messages?
In addition, when I use indexscan(A INDEX_NAME), it is invalid.It seems to be case sensitive.
Yeah, that is the correct specification of pg_hint_plan.
(Sorry for late response)
Given that it is not a part of system shutdown, the only instance of the cause I know is HA clustering tools.
If you are able to provide a self-contained test case able to reproduce a crash of any kind, please feel free to paste it here and reopen this issue. Based on the information given, this just refers to a fast sequence shutdown, which is not a bug but a normal part of a PostgreSQL instance stopped. Hence, I am closing this bug.