[Pkg-postgresql-public] Feature proposal : knob to prevent clusters from being stopped by dpkg

Christoph Berg myon at debian.org
Wed Oct 5 16:22:28 UTC 2016


Re: Pierre Ducroquet 2016-10-05 <2384876.jxRJq2Nt6j at laptop-pierred>
> Hi
> 
> In order to ease maintenance and reduce downtimes, we would like in our 
> environment to control ourselves when the postgresql clusters are shut down 
> (in order to synchronize with pausing the bouncer for instance)
> This is currently not possible with the debian postgresql packages, where a 
> minor upgrade will shut down, upgrade and restart the cluster.
> I propose the attached simple patch, adding a check on a /etc/postgresql-
> common/disable-unattended-restart file. If that file is present, clusters are 
> not stopped.
> Would this behaviour change be acceptable ? If so, what is the proper way to 
> submit a patch to the package ?

Hi,

the proper way to do that is supplying a /usr/sbin/policy-rc.d file, e.g.


#!/bin/sh

while true; do
  case "$1" in
    -*)         shift ;;
    makedev)    exit 0;;
    *)
      exit 101
      ;;
  esac
done


https://people.debian.org/~hmh/invokerc.d-policyrc.d-specification.txt


Christoph



More information about the Pkg-postgresql-public mailing list