Skip to content

Commit

Permalink
Apply valgrind patch only if PG < 16
Browse files Browse the repository at this point in the history
  • Loading branch information
onurctirtir authored Sep 18, 2023
1 parent 98c193e commit b31cd17
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions fabfile/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,12 @@ def build_postgres(c):
c.run('tar -xf {}.tar.bz2'.format(final_dir), hide='stdout')

with c.cd(final_dir):
# apply the patch that helps reporting the queries that cause memory errors under valgrind
patch_path = os.path.join(config.HOME_DIR, "test-automation/fabfile/pg_report_vg_query.patch")
c.run('git apply {}'.format(patch_path))
# Apply the patch that helps reporting the queries that cause memory errors under valgrind
# if Postgres version is older than 16. This is because, the relevant patch has already been
# merged into Postgres in 16.
if PG_VERSION.split(".")[0] < "16":
patch_path = os.path.join(config.HOME_DIR, "test-automation/fabfile/pg_report_vg_query.patch")
c.run('git apply {}'.format(patch_path))

pg_latest = config.PG_LATEST
flags = ' '.join(config.PG_CONFIGURE_FLAGS)
Expand Down

0 comments on commit b31cd17

Please sign in to comment.