pg.ddx.io pgsql-pkg-debian@postgresql.org mailing list archive
help / color / mirror / Atom feedUpgrade packages - Control Instance
3+ messages / 2 participants
[nested] [flat]
* Upgrade packages - Control Instance
@ 2019-05-21 09:58 Sébastien Lardière <sebastien@lardiere.net>
0 siblings, 1 reply; 3+ messages in thread
From: Sébastien Lardière @ 2019-05-21 09:58 UTC (permalink / raw)
To: pgsql-pkg-debian@lists.postgresql.org
Hi,
I'm looking for a way to control the way instances are restarted when
`apt upgrade` run => sometime, if there is a large number of packages to
upgrade, the instances is stopped for a long time.
In the past, I used to use start.conf with manual setting, then restart
"manually" after the upgrade, which give downtime as short as I can ;
but now, it seems that "stop" is always done, even when i disable the
systemd service (ok,it is weird to disable service and to want the
service up, I know ) => I think that the fact we can't forbid the stop
is not correct.
I know that I can hold the postgresql packages, run the big `apt
upgrade` then unhold packages and do the postgresql upgrade, but I think
it's a more complicated way to do it.
Am I miss something ?
Am I the only one disturbed by the fact that we can't forbid stop ?
regards,
--
Sébastien
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Upgrade packages - Control Instance
@ 2019-05-21 10:09 Christoph Berg <myon@debian.org>
parent: Sébastien Lardière <sebastien@lardiere.net>
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Berg @ 2019-05-21 10:09 UTC (permalink / raw)
To: Sébastien Lardière <sebastien@lardiere.net>; +Cc: pgsql-pkg-debian@lists.postgresql.org
Re: Sébastien Lardière 2019-05-21 <f4efadb7-ecb0-ba1f-383b-b9a38f988f87@lardiere.net>
> Hi,
>
> I'm looking for a way to control the way instances are restarted when
> `apt upgrade` run => sometime, if there is a large number of packages to
> upgrade, the instances is stopped for a long time.
>
> In the past, I used to use start.conf with manual setting, then restart
> "manually" after the upgrade, which give downtime as short as I can ;
> but now, it seems that "stop" is always done, even when i disable the
> systemd service (ok,it is weird to disable service and to want the
> service up, I know ) => I think that the fact we can't forbid the stop
> is not correct.
>
> I know that I can hold the postgresql packages, run the big `apt
> upgrade` then unhold packages and do the postgresql upgrade, but I think
> it's a more complicated way to do it.
>
> Am I miss something ?
>
> Am I the only one disturbed by the fact that we can't forbid stop ?
The generic solution is policy-rc.d:
https://people.debian.org/~hmh/invokerc.d-policyrc.d-specification.txt
Simple sample implementation:
#!/bin/sh
# policy-rc.d script for chroots.
# Copyright (c) 2007 Peter Palfrader <peter@palfrader.org>
test -f /etc/debian_chroot || exit 0
while true; do
case "$1" in
-*) shift ;;
makedev) exit 0;;
*)
echo "Not running services in chroot."
exit 101
;;
esac
done
Christoph
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Upgrade packages - Control Instance
@ 2019-05-21 12:39 Sébastien Lardière <sebastien@lardiere.net>
parent: Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 3+ messages in thread
From: Sébastien Lardière @ 2019-05-21 12:39 UTC (permalink / raw)
To: Christoph Berg <myon@debian.org>; +Cc: pgsql-pkg-debian@lists.postgresql.org
On 21/05/2019 12:09, Christoph Berg wrote:
> Re: Sébastien Lardière 2019-05-21 <f4efadb7-ecb0-ba1f-383b-b9a38f988f87@lardiere.net>
>> Hi,
>>
>> I'm looking for a way to control the way instances are restarted when
>> `apt upgrade` run => sometime, if there is a large number of packages to
>> upgrade, the instances is stopped for a long time.
>>
>> In the past, I used to use start.conf with manual setting, then restart
>> "manually" after the upgrade, which give downtime as short as I can ;
>> but now, it seems that "stop" is always done, even when i disable the
>> systemd service (ok,it is weird to disable service and to want the
>> service up, I know ) => I think that the fact we can't forbid the stop
>> is not correct.
>>
>> I know that I can hold the postgresql packages, run the big `apt
>> upgrade` then unhold packages and do the postgresql upgrade, but I think
>> it's a more complicated way to do it.
>>
>> Am I miss something ?
>>
>> Am I the only one disturbed by the fact that we can't forbid stop ?
> The generic solution is policy-rc.d:
>
> https://people.debian.org/~hmh/invokerc.d-policyrc.d-specification.txt
>
> Simple sample implementation:
>
> #!/bin/sh
>
> # policy-rc.d script for chroots.
> # Copyright (c) 2007 Peter Palfrader <peter@palfrader.org>
>
> test -f /etc/debian_chroot || exit 0
>
> while true; do
> case "$1" in
> -*) shift ;;
> makedev) exit 0;;
> *)
> echo "Not running services in chroot."
> exit 101
> ;;
> esac
> done
>
Indeed, it works, I just added :
postgresql*)
echo "Do not manage PostgreSQL service"
exit 101
;;
to manage postgresql specifically. The path is /usr/sbin/policy-rc.d ;
then chmod a+x
thanks,
--
Sébastien
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2019-05-21 12:39 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-05-21 09:58 Upgrade packages - Control Instance Sébastien Lardière <sebastien@lardiere.net>
2019-05-21 10:09 ` Christoph Berg <myon@debian.org>
2019-05-21 12:39 ` Sébastien Lardière <sebastien@lardiere.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox