8000 Fix bogus provolatile/proparallel markings on a few built-in functions. · MSPawanRanjith/postgres@485857d · GitHub
[go: up one dir, main page]

Skip to content

Commit 485857d

Browse files
committed
Fix bogus provolatile/proparallel markings on a few built-in functions.
Richard Yen reported that pg_upgrade failed if the target cluster had force_parallel_mode = on, because binary_upgrade_create_empty_extension() is marked parallel restricted, allowing it to be executed in parallel mode, which complains because it tries to acquire an XID. In general, no function that might try to modify database data should be considered parallel safe or restricted, since execution of it might force XID acquisition. We found several other examples of this mistake. Furthermore, functions that execute user-supplied SQL queries or query fragments, or pull data from user-supplied cursors, had better be marked both volatile and parallel unsafe, because we don't know what the supplied query or cursor might try to do. There were several tsquery and XML functions that had the wrong proparallel marking for this, and some of them were even mislabeled as to volatility. All these bugs are old, dating back to 9.6 for the proparallel mistakes and much further for the provolatile mistakes. We can't force a catversion bump in the back branches, but we can at least ensure that installations initdb'd in future have the right values. Thomas Munro and Tom Lane Discussion: https://postgr.es/m/CAEepm=2sNDScSLTfyMYu32Q=ob98ZGW-vM_2oLxinzSABGQ6VA@mail.gmail.com
1 parent 10fbb0e commit 485857d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/include/catalog/pg_proc.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4042,19 +4042,19 @@ DESCR("serialize an XML value to a character string");
40424042

40434043
DATA(insert OID = 2923 ( table_to_xml PGNSP PGUID 12 100 0 0 0 f f f f t f s 4 0 142 "2205 16 16 25" _null_ _null_ "{tbl,nulls,tableforest,targetns}" _null_ table_to_xml _null_ _null_ _null_ ));
40444044
DESCR("map table contents to XML");
4045-
DATA(insert OID = 2924 ( query_to_xml PGNSP PGUID 12 100 0 0 0 f f f f t f s 4 0 142 "25 16 16 25" _null_ _null_ "{query,nulls,tableforest,targetns}" _null_ query_to_xml _null_ _null_ _null_ ));
4045+
DATA(insert OID = 2924 ( query_to_xml PGNSP PGUID 12 100 0 0 0 f f f f t f v 4 0 142 "25 16 16 25" _null_ _null_ "{query,nulls,tableforest,targetns}" _null_ query_to_xml _null_ _null_ _null_ ));
40464046
DESCR("map query result to XML");
4047-
DATA(insert OID = 2925 ( cursor_to_xml PGNSP PGUID 12 100 0 0 0 f f f f t f s 5 0 142 "1790 23 16 16 25" _null_ _null_ "{cursor,count,nulls,tableforest,targetns}" _null_ cursor_to_xml _null_ _null_ _null_ ));
4047+
DATA(insert OID = 2925 ( cursor_to_xml PGNSP PGUID 12 100 0 0 0 f f f f t f v 5 0 142 "1790 23 16 16 25" _null_ _null_ "{cursor,count,nulls,tableforest,targetns}" _null_ cursor_to_xml _null_ _null_ _null_ ));
40484048
DESCR("map rows from cursor to XML");
40494049
DATA(insert OID = 2926 ( table_to_xmlschema PGNSP PGUID 12 100 0 0 0 f f f f t f s 4 0 142 "2205 16 16 25" _null_ _null_ "{tbl,nulls,tableforest,targetns}" _null_ table_to_xmlschema _null_ _null_ _null_ ));
40504050
DESCR("map table structure to XML Schema");
4051-
DATA(insert OID = 2927 ( query_to_xmlschema PGNSP PGUID 12 100 0 0 0 f f f f t f s 4 0 142 "25 16 16 25" _null_ _null_ "{query,nulls,tableforest,targetns}" _null_ query_to_xmlschema _null_ _null_ _null_ ));
4051+
DATA(insert OID = 2927 ( query_to_xmlschema PGNSP PGUID 12 100 0 0 0 f f f f t f v 4 0 142 "25 16 16 25" _null_ _null_ "{query,nulls,tableforest,targetns}" _null_ query_to_xmlschema _null_ _null_ _null_ ));
40524052
DESCR("map query result structure to XML Schema");
4053-
DATA(insert OID = 2928 ( cursor_to_xmlschema PGNSP PGUID 12 100 0 0 0 f f f f t f s 4 0 142 "1790 16 16 25" _null_ _null_ "{cursor,nulls,tableforest,targetns}" _null_ cursor_to_xmlschema _null_ _null_ _null_ ));
4053+
DATA(insert OID = 2928 ( cursor_to_xmlschema PGNSP PGUID 12 100 0 0 0 f f f f t f v 4 0 142 "1790 16 16 25" _null_ _null_ "{cursor,nulls,tableforest,targetns}" _null_ cursor_to_xmlschema _null_ _null_ _null_ ));
40544054
DESCR("map cursor structure to XML Schema");
40554055
DATA(insert OID = 2929 ( table_to_xml_and_xmlschema PGNSP PGUID 12 100 0 0 0 f f f f t f s 4 0 142 "2205 16 16 25" _null_ _null_ "{tbl,nulls,tableforest,targetns}" _null_ table_to_xml_and_xmlschema _null_ _null_ _null_ ));
40564056
DESCR("map table contents and structure to XML and XML Schema");
4057-
DATA(insert OID = 2930 ( query_to_xml_and_xmlschema PGNSP PGUID 12 100 0 0 0 f f f f t f s 4 0 142 "25 16 16 25" _null_ _null_ "{query,nulls,tableforest,targetns}" _null_ query_to_xml_and_xmlschema _null_ _null_ _null_ ));
4057+
DATA(insert OID = 2930 ( query_to_xml_and_xmlschema PGNSP PGUID 12 100 0 0 0 f f f f t f v 4 0 142 "25 16 16 25" _null_ _null_ "{query,nulls,tableforest,targetns}" _null_ query_to_xml_and_xmlschema _null_ _null_ _null_ ));
40584058
DESCR("map query result and structure to XML and XML Schema");
40594059

40604060
DATA(insert OID = 2933 ( schema_to_xml PGNSP PGUID 12 100 0 0 0 f f f f t f s 4 0 142 "19 16 16 25" _null_ _null_ "{schema,nulls,tableforest,targetns}" _null_ schema_to_xml _null_ _null_ _null_ ));

0 commit comments

Comments
 (0)
0