anchor.diff:              && apt-get update \
   
               # Install PostgreSQL binaries, contrib, pgq, plproxy, pgq and multiple pl's
  -            && apt-get install -y postgresql-${version} postgresql-${version}-dbg postgresql-client-${version} \
  -                        postgresql-contrib-${version} postgresql-${version}-plproxy postgresql-${version}-pgq3 \
  -                        postgresql-${version}-postgis-2.3 postgresql-plpython3-${version} \
  +            && apt-get install --allow-downgrades -y postgresql-${version} postgresql-${version}-dbg \
  +                        postgresql-client-${version} postgresql-contrib-${version} postgresql-${version}-plproxy \
  +                        postgresql-${version}-pgq3 postgresql-${version}-postgis-2.3 postgresql-plpython3-${version} \
                           postgresql-plpython-${version} postgresql-${version}-plr postgresql-pltcl-${version} \
                           postgresql-${version}-plv8 postgresql-${version}-pllua postgresql-plperl-${version} \
                           libpq5=$version* libpq-dev=$version* postgresql-server-dev-${version} \
  
positive.code:     && curl -s -o - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
  
      && apt-get update \
      && apt-get install -y postgresql-common ${BUILD_PACKAGES} \
      # forbid creation of a main cluster when package is installed
      && sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
  
      # 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=b329f9e143521077cf55266355d265857ff9a3bf \
      && curl -s -L https://github.com/reorg/pg_repack/archive/$PG_REPACK_COMMIT.tar.gz | tar xz \
  
      && for version in ${PGOLDVERSIONS} ${PGVERSION}; do \
  
negative.code:                 export REWIND_VER=REL$(echo $version | sed 's/\./_/')_STABLE \
                  && apt-get source postgresql-${version} \
                  && curl -s -L https://github.com/vmware/pg_rewind/archive/${REWIND_VER}.tar.gz | tar xz \
                  && make -C pg_rewind-${REWIND_VER} USE_PGXS=1 top_srcdir=../$(ls -d postgresql-${version}-*) install \
                  && rm -fr pg_rewind-${REWIND_VER} postgresql-${version}*; \
              fi \
  
  