Skip to content

Commit

Permalink
Update pq harness to play nicely with variable LSNs.
Browse files Browse the repository at this point in the history
  • Loading branch information
dwsteele committed Dec 8, 2019
1 parent d258725 commit f517b14
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/src/common/harnessPq.h
Expand Up @@ -409,10 +409,10 @@ Macros for defining groups of functions that implement various queries and comma
sessionParam, walNameParam, lsnNameParam, targetLsnParam, targetReachedParam, replayLsnParam) \
{.session = sessionParam, \
.function = HRNPQ_SENDQUERY, \
.param = \
.param = strPtr(strNewFmt( \
"[\"select replayLsn::text,\\n" \
" (replayLsn > '" targetLsnParam "')::bool as targetReached\\n" \
" from pg_catalog.pg_last_" walNameParam "_replay_" lsnNameParam "() as replayLsn\"]", \
" (replayLsn > '%s')::bool as targetReached\\n" \
" from pg_catalog.pg_last_" walNameParam "_replay_" lsnNameParam "() as replayLsn\"]", targetLsnParam)), \
.resultInt = 1}, \
{.session = sessionParam, .function = HRNPQ_CONSUMEINPUT}, \
{.session = sessionParam, .function = HRNPQ_ISBUSY}, \
Expand All @@ -436,10 +436,10 @@ Macros for defining groups of functions that implement various queries and comma
#define HRNPQ_MACRO_CHECKPOINT_TARGET_REACHED(sessionParam, lsnNameParam, targetLsnParam, targetReachedParam, checkpointLsnParam) \
{.session = sessionParam, \
.function = HRNPQ_SENDQUERY, \
.param = \
"[\"select (checkpoint_" lsnNameParam " > '" targetLsnParam "')::bool as targetReached,\\n" \
.param = strPtr(strNewFmt( \
"[\"select (checkpoint_" lsnNameParam " > '%s')::bool as targetReached,\\n" \
" checkpoint_" lsnNameParam "::text as checkpointLsn\\n" \
" from pg_catalog.pg_control_checkpoint()\"]", \
" from pg_catalog.pg_control_checkpoint()\"]", targetLsnParam)), \
.resultInt = 1}, \
{.session = sessionParam, .function = HRNPQ_CONSUMEINPUT}, \
{.session = sessionParam, .function = HRNPQ_ISBUSY}, \
Expand Down

0 comments on commit f517b14

Please sign in to comment.