Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ fab use.enterprise:v7.1.1 setup.enterprise
fab use.debug_mode use.postgres:10.1 use.citus:v7.1.1 setup.basic_testing
```

`use.debug_mode` passes the following flags to postges' configure: `--enable-debug --enable-cassert CFLAGS="-ggdb -Og -g3 -fno-omit-frame-pointer"`
`use.debug_mode` passes the following flags to postges' configure: `--enable-cassert CFLAGS="-ggdb -Og -g3 -fno-omit-frame-pointer"`

`use.asserts` passes `--enable-cassert`, it's a subset of `use.debug_mode`.

Expand Down
3 changes: 2 additions & 1 deletion fabfile/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
CITUS_INSTALLATION = os.path.join(HOME_DIR, 'citus-installation')

PG_VERSION = '9.6.1'
PG_CONFIGURE_FLAGS = ['--with-openssl']
PG_CONFIGURE_FLAGS = ['--with-openssl --enable-debug']
PG_CFLAGS = ['-ggdb -g3']

settings = {
IS_SSH_KEYS_USED: True
Expand Down
5 changes: 2 additions & 3 deletions fabfile/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,14 @@ def tpch():

@task
def valgrind():
'Just like basic_testing, but adds --enable-debug flag and installs valgrind'
'Just like basic_testing, but installs valgrind'
execute(prefix.ensure_pg_latest_exists, default=config.CITUS_INSTALLATION)

# we do this execute dance so valgrind is installed on every node, not just the master
def install_valgrind():
sudo('yum install -q -y valgrind')
execute(install_valgrind)

config.PG_CONFIGURE_FLAGS.append('--enable-debug')

execute(common_setup, build_citus)
execute(add_workers)

Expand Down Expand Up @@ -185,6 +183,7 @@ def build_postgres():
with cd(final_dir):
pg_latest = config.PG_LATEST
flags = ' '.join(config.PG_CONFIGURE_FLAGS)
flags += ' CFLAGS="%s"' % ' '.join(config.PG_CFLAGS).replace('"', '\\"')
with hide('stdout'):
run('./configure --prefix={} {}'.format(pg_latest, flags))

Expand Down
9 changes: 7 additions & 2 deletions fabfile/use.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,10 @@ def asserts(*args):

@task
def debug_mode(*args):
'''ps's configure is passed: '--enable-debug --enable-cassert CFLAGS="-ggdb -Og -g3 -fno-omit-frame-pointer"' '''
config.PG_CONFIGURE_FLAGS.append('--enable-debug --enable-cassert CFLAGS="-ggdb -Og -g3 -fno-omit-frame-pointer"')
'''
pg's configure is passed: '--enable-debug --enable-cassert CFLAGS="-ggdb -g3 -Og -fno-omit-frame-pointer"'
Normally this does not contain --enable-cassert, -Og and
-fno-omit-frame-pointer. The rest are default.
'''
config.PG_CONFIGURE_FLAGS.append('--enable-cassert')
config.PG_CFLAGS.append('-Og -fno-omit-frame-pointer')