Skip to content

Commit

Permalink
Different fixes: (#161)
Browse files Browse the repository at this point in the history
* Remove --no-loop argument from pg_receivexlog
  Fixes: #158

* pep8 formatting

* Install pg_repack with pgxn
  • Loading branch information
CyberDem0n committed May 8, 2017
1 parent 551915e commit fbcf6e0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
10 changes: 1 addition & 9 deletions postgres-appliance/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ RUN export DEBIAN_FRONTEND=noninteractive \
&& export DECODEBUFS_COMMIT=d9415fc78fa255d990ea2371720876bebe34ceb9 \
&& curl -s -L https://github.com/debezium/postgres-decoderbufs/archive/$DECODEBUFS_COMMIT.tar.gz | tar xz \

# This is a temporary solution of pg_repack problems with UPSERTS
# as soon they will release a new version we should switch back to pgxn
&& export PG_REPACK_COMMIT=df96f3534551682b1b086e1878c75fdcfcdb63ca \
&& curl -s -L https://github.com/reorg/pg_repack/archive/$PG_REPACK_COMMIT.tar.gz | tar xz \

&& for version in ${PGOLDVERSIONS} ${PGVERSION}; do \
# next two lines are necessary to install exact versions of libpq5 and libpq-dev (to compile extensions)
sed -i "s/ main.*$/ main $version/g" /etc/apt/sources.list.d/pgdg.list \
Expand All @@ -69,17 +64,14 @@ RUN export DEBIAN_FRONTEND=noninteractive \
libpq5=$version* libpq-dev=$version* postgresql-server-dev-${version} \

# install 3rd party extensions
&& for extension in quantile trimmed_aggregates; do \
&& for extension in quantile trimmed_aggregates pg_repack; do \
pgxn install $extension; \
done \

&& if [ "$version" != "9.3" ]; then \
make -C postgres-decoderbufs-$DECODEBUFS_COMMIT clean install; \
fi \

# Install pg_repack
&& make -C pg_repack-${PG_REPACK_COMMIT} clean install \

# Install pg_rewind on 9.3 and 9.4
&& if [ "$version" = "9.3" ] || [ "$version" = "9.4" ]; then \
export REWIND_VER=REL$(echo $version | sed 's/\./_/')_STABLE \
Expand Down
2 changes: 1 addition & 1 deletion postgres-appliance/basebackup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ done
[[ -z $DATA_DIR || -z $CONNSTR || ! $RETRIES =~ ^[1-9]$ ]] && exit 1

function receivexlog() {
pg_receivexlog --no-loop --directory="${XLOG_FAST}" --dbname="${CONNSTR}" &
pg_receivexlog --directory="${XLOG_FAST}" --dbname="${CONNSTR}" &
receivexlog_pid=$!

# run pg_receivexlog until postgres will not start streaming
Expand Down
1 change: 1 addition & 0 deletions postgres-appliance/configure_spilo.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
USE_KUBERNETES = os.environ.get('KUBERNETES_SERVICE_HOST') is not None
MEMORY_LIMIT_IN_BYTES_PATH = '/sys/fs/cgroup/memory/memory.limit_in_bytes'


def parse_args():
sections = ['all', 'patroni', 'patronictl', 'certificate', 'wal-e', 'crontab', 'ldap', 'pam-oauth2']
argp = argparse.ArgumentParser(description='Configures Spilo',
Expand Down

0 comments on commit fbcf6e0

Please sign in to comment.