File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1155,7 +1155,16 @@ exec_simple_query(const char *query_string)
1155
1155
plantree_list = pg_plan_queries (querytree_list ,
1156
1156
CURSOR_OPT_PARALLEL_OK , NULL );
1157
1157
1158
- /* Done with the snapshot used for parsing/planning */
1158
+ /*
1159
+ * Done with the snapshot used for parsing/planning.
1160
+ *
1161
+ * While it looks promising to reuse the same snapshot for query
1162
+ * execution (at least for simple protocol), unfortunately it causes
1163
+ * execution to use a snapshot that has been acquired before locking
1164
+ * any of the tables mentioned in the query. This creates user-
1165
+ * visible anomalies, so refrain. Refer to
1166
+ * https://postgr.es/m/flat/5075D8DF.6050500@fuzzy.cz for details.
1167
+ */
1159
1168
if (snapshot_set )
1160
1169
PopActiveSnapshot ();
1161
1170
You can’t perform that action at this time.
0 commit comments