diff options
author | Andres Freund <andres@anarazel.de> | 2021-12-13 11:39:52 -0800 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2021-12-13 11:39:52 -0800 |
commit | fe490f9ad7ab3fc9279c9810304b524aae36c3b6 (patch) | |
tree | 0bf9602f5a5fd7a5c8bb4c6655d1ec974cceff59 /src/test/isolation/isolation_main.c | |
parent | 0862317b126c02da19da07a42a132f70526669e3 (diff) |
backpatch "Set application_name per-test in isolation and ecpg tests."
We started to backpatch test infrastructure improvements more aggressively to
make it easier to backpatch test. A proposed isolationtester improvement has a
dependency on b1907d688, backpatch b1907d688 to make it easier to subsequently
backpatch the new proposed isolationtester change.
Discussion: https://postgr.es/m/861977.1639421872@sss.pgh.pa.us
Backpatch: 10-12, the commit already is in 13-HEAD
Diffstat (limited to 'src/test/isolation/isolation_main.c')
-rw-r--r-- | src/test/isolation/isolation_main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/isolation/isolation_main.c b/src/test/isolation/isolation_main.c index 294bf30470a..b9e25337726 100644 --- a/src/test/isolation/isolation_main.c +++ b/src/test/isolation/isolation_main.c @@ -36,6 +36,7 @@ isolation_start_test(const char *testname, char expectfile[MAXPGPATH]; char psql_cmd[MAXPGPATH * 3]; size_t offset = 0; + char *appnameenv; /* need to do the path lookup here, check isolation_init() for details */ if (!looked_up_isolation_exec) @@ -97,6 +98,9 @@ isolation_start_test(const char *testname, exit(2); } + appnameenv = psprintf("PGAPPNAME=isolation/%s", testname); + putenv(appnameenv); + pid = spawn_process(psql_cmd); if (pid == INVALID_PID) @@ -106,6 +110,9 @@ isolation_start_test(const char *testname, exit(2); } + unsetenv("PGAPPNAME"); + free(appnameenv); + return pid; } |