From b15c71122ebbebfb71b7d82521b1073dbc8a9aac Mon Sep 17 00:00:00 2001 From: evsi Date: Sat, 9 May 2026 00:24:00 +0000 Subject: [PATCH 1/2] Reconnect after mid-file ALTER SYSTEM RESET in pg_tle_api tests Adds the standard '\c -' reconnect after SELECT pg_reload_conf(); in pg_tle_api.sql and pg_tle_api_clusterwide.sql. These were not all there and caused race conditions due to the well known issue [1]. [1] https://github.com/aws/pg_tle/commit/6d43e7cfd3b198a242ade20553825572d52f5848 --- test/expected/pg_tle_api.out | 1 + test/expected/pg_tle_api_clusterwide.out | 1 + test/sql/pg_tle_api.sql | 1 + test/sql/pg_tle_api_clusterwide.sql | 1 + 4 files changed, 4 insertions(+) diff --git a/test/expected/pg_tle_api.out b/test/expected/pg_tle_api.out index e941055..8c34f30 100644 --- a/test/expected/pg_tle_api.out +++ b/test/expected/pg_tle_api.out @@ -253,6 +253,7 @@ SELECT pg_reload_conf(); t (1 row) +\c - DROP FUNCTION test_validuntil; DROP FUNCTION password_check_length_greater_than_8; DROP FUNCTION password_check_only_nums; diff --git a/test/expected/pg_tle_api_clusterwide.out b/test/expected/pg_tle_api_clusterwide.out index 6700054..0bdcfc9 100644 --- a/test/expected/pg_tle_api_clusterwide.out +++ b/test/expected/pg_tle_api_clusterwide.out @@ -258,6 +258,7 @@ SELECT pg_reload_conf(); t (1 row) +\c - DROP FUNCTION test_validuntil; DROP FUNCTION password_check_length_greater_than_8; DROP FUNCTION password_check_only_nums; diff --git a/test/sql/pg_tle_api.sql b/test/sql/pg_tle_api.sql index cac7e9a..ec72a60 100644 --- a/test/sql/pg_tle_api.sql +++ b/test/sql/pg_tle_api.sql @@ -155,6 +155,7 @@ DROP SCHEMA testuser_2; DROP ROLE testuser_2; ALTER SYSTEM RESET pgtle.enable_password_check; SELECT pg_reload_conf(); +\c - DROP FUNCTION test_validuntil; DROP FUNCTION password_check_length_greater_than_8; DROP FUNCTION password_check_only_nums; diff --git a/test/sql/pg_tle_api_clusterwide.sql b/test/sql/pg_tle_api_clusterwide.sql index 5d4a3d8..20120b4 100644 --- a/test/sql/pg_tle_api_clusterwide.sql +++ b/test/sql/pg_tle_api_clusterwide.sql @@ -165,6 +165,7 @@ DROP SCHEMA testuser_2; DROP ROLE testuser_2; ALTER SYSTEM RESET pgtle.enable_password_check; SELECT pg_reload_conf(); +\c - DROP FUNCTION test_validuntil; DROP FUNCTION password_check_length_greater_than_8; DROP FUNCTION password_check_only_nums; From 184e7ae959afbcec0f7c4bd22dbc7a1e28d32709 Mon Sep 17 00:00:00 2001 From: evsi Date: Sat, 9 May 2026 00:24:00 +0000 Subject: [PATCH 2/2] Mark assert-only address in pg_tle_create_base_type_internal --- src/datatype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datatype.c b/src/datatype.c index f205812..5b3211f 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -228,7 +228,7 @@ pg_tle_create_base_type_internal(Oid typeNamespace, Oid typeOid; Oid array_oid; char *array_type; - ObjectAddress address; + ObjectAddress address PG_USED_FOR_ASSERTS_ONLY; Oid inputFuncParamType; Oid outputFuncParamType; char *namespaceName;