Skip to content

Commit add7775

Browse files
committed
Mark consume_xids test functions VOLATILE and PARALLEL UNSAFE
Both functions advance the transaction ID, which modifies the system state. Thus, they should be marked as VOLATILE. Additionally, they call the AssignTransactionId function, which cannot be invoked in parallel mode, so they should be marked as PARALLEL UNSAFE. Author: Yushi Ogiwara <btogiwarayuushi@oss.nttdata.com> Discussion: https://www.postgresql.org/message-id/18f01e4fd46448f88c7a1363050a9955@oss.nttdata.com
1 parent 682512d commit add7775

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/modules/xid_wraparound/xid_wraparound--1.0.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
\echo Use "CREATE EXTENSION xid_wraparound" to load this file. \quit
55

66
CREATE FUNCTION consume_xids(nxids bigint)
7-
RETURNS xid8 IMMUTABLE PARALLEL SAFE STRICT
7+
RETURNS xid8 VOLATILE PARALLEL UNSAFE STRICT
88
AS 'MODULE_PATHNAME' LANGUAGE C;
99

1010
CREATE FUNCTION consume_xids_until(targetxid xid8)
11-
RETURNS xid8 IMMUTABLE PARALLEL SAFE STRICT
11+
RETURNS xid8 VOLATILE PARALLEL UNSAFE STRICT
1212
AS 'MODULE_PATHNAME' LANGUAGE C;

0 commit comments

Comments
 (0)