Fix cross-version upgrade test breakage from commit fe07100e82. · postgres/postgres@0c2b717 · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Commit 0c2b717

Browse files
Fix cross-version upgrade test breakage from commit fe07100.
In commit fe07100, I renamed a couple of functions in test_dsm_registry to make it clear what they are testing. However, the buildfarm's cross-version upgrade tests run pg_upgrade with the test modules installed, so this caused errors like: ERROR: could not find function "get_val_in_shmem" in file ".../test_dsm_registry.so" To fix, revert those renames. I could probably get away with only un-renaming the C symbols, but I figured I'd avoid introducing function name mismatches. Also, AFAICT the buildfarm's cross-version upgrade tests do not run the test module tests post-upgrade, else we'll need to properly version the extension. Per buildfarm member crake. Discussion: https://postgr.es/m/aGVuYUNW23tStUYs%40nathan
1 parent bb10938 commit 0c2b717

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

src/test/modules/test_dsm_registry/expected/test_dsm_registry.out

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CREATE EXTENSION test_dsm_registry;
2-
SELECT set_val_in_dsm(1236);
3-
set_val_in_dsm
4-
----------------
2+
SELECT set_val_in_shmem(1236);
3+
set_val_in_shmem
4+
------------------
55

66
(1 row)
77

@@ -12,10 +12,10 @@ SELECT set_val_in_hash('test', '1414');
1212
(1 row)
1313

1414
\c
15-
SELECT get_val_in_dsm();
16-
get_val_in_dsm
17-
----------------
18-
1236
15+
SELECT get_val_in_shmem();
16+
get_val_in_shmem
17+
------------------
18+
1236
1919
(1 row)
2020

2121
SELECT get_val_in_hash('test');
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CREATE EXTENSION test_dsm_registry;
2-
SELECT set_val_in_dsm(1236);
2+
SELECT set_val_in_shmem(1236);
33
SELECT set_val_in_hash('test', '1414');
44
\c
5-
SELECT get_val_in_dsm();
5+
SELECT get_val_in_shmem();
66
SELECT get_val_in_hash('test');

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
44
\echo Use "CREATE EXTENSION test_dsm_registry" to load this file. \quit
55

6-
CREATE FUNCTION set_val_in_dsm(val INT) RETURNS VOID
6+
CREATE FUNCTION set_val_in_shmem(val INT) RETURNS VOID
77
AS 'MODULE_PATHNAME' LANGUAGE C;
88

9-
CREATE FUNCTION get_val_in_dsm() RETURNS INT
9+
CREATE FUNCTION get_val_in_shmem() RETURNS INT
1010
AS 'MODULE_PATHNAME' LANGUAGE C;
1111

1212
CREATE FUNCTION set_val_in_hash(key TEXT, val TEXT) RETURNS VOID

src/test/modules/test_dsm_registry/test_dsm_registry.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ tdr_attach_shmem(void)
7070
tdr_hash = GetNamedDSHash("test_dsm_registry_hash", &dsh_params, &found);
7171
}
7272

73-
PG_FUNCTION_INFO_V1(set_val_in_dsm);
73+
PG_FUNCTION_INFO_V1(set_val_in_shmem);
7474
Datum
75-
set_val_in_dsm(PG_FUNCTION_ARGS)
75+
set_val_in_shmem(PG_FUNCTION_ARGS)
7676
{
7777
tdr_attach_shmem();
7878

@@ -83,9 +83,9 @@ set_val_in_dsm(PG_FUNCTION_ARGS)
8383
PG_RETURN_VOID();
8484
}
8585

86-
PG_FUNCTION_INFO_V1(get_val_in_dsm);
86+
PG_FUNCTION_INFO_V1(get_val_in_shmem);
8787
Datum
88-
get_val_in_dsm(PG_FUNCTION_ARGS)
88+
get_val_in_shmem(PG_FUNCTION_ARGS)
8989
{
9090
int ret;
9191

0 commit comments

Comments
 (0)

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.