Обсуждение: yum update minor version | /sbin/service postgresql-11 condstopquestion
Hello List, I have a couple of questions that I am hoping someone can shed some light on, I am learning how rpms work. thank you all!!! [root@jr-sandbox ~]# uname -a Linux jr-sandbox 2.6.32-754.23.1.el6.x86_64 #1 SMP Thu Sep 26 12:05:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux [root@jr-sandbox ~]# cat /etc/redhat-release CentOS release 6.10 (Final) postgres=# select version(); version --------------------------------------------------------------------------------------------------------- PostgreSQL 11.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23), 64-bit (1 row) I am trying to understand what happens when you yum update postgresql11-server, I have taken a look at the rpm scripts, Iam very new to RPM package details so bear with me. I no longer see a condstop function in the /etc/init.d/postgresql-11 init script, so if you are trying remove last versionof the package, which I think happens first when updating, not sure this would work, please help me understand this? if [ $1 -eq 0 ] ; then /sbin/service postgresql-11 condstop >/dev/null 2>&1 chkconfig --del postgresql-11 fi My ultimate goal here is to find out what happens when you yum update a minor version of postgresql11-server, I would liketo know if postgresql11-server will stop, or do I need to manually do this? I see the following block under postuninstall,so is this after the packages are removed it restarts the service? Will it remove the previous packages withoutstopping the database? Please forgive my ignorance here, and help me understand what happens when you yum update toa minor version. Thank you for the great effort on this awesome piece of software. postuninstall scriptlet (using /bin/sh): /sbin/ldconfig /sbin/service postgresql-11 condrestart >/dev/null 2>&1 if [ $1 -ge 1 ] ; then /sbin/service postgresql-11 condrestart >/dev/null 2>&1 fi [root@devdbadmin 6]# rpm -qp --scripts postgresql11-server-11.5-1PGDG.rhel6.x86_64.rpm warning: postgresql11-server-11.5-1PGDG.rhel6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY preinstall scriptlet (using /bin/sh): groupadd -g 26 -o -r postgres >/dev/null 2>&1 || : useradd -M -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \ -c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || : postinstall scriptlet (using /bin/sh): /sbin/ldconfig if [ $1 -eq 1 ] ; then chkconfig --add postgresql-11 fi # postgres' .bash_profile. # We now don't install .bash_profile as we used to in pre 9.0. Instead, use cat, # so that package manager will be happy during upgrade to new major version. echo "[ -f /etc/profile ] && source /etc/profile PGDATA=/var/lib/pgsql/11/data export PGDATA # If you want to customize your settings, # Use the file below. This is not overridden # by the RPMS. [ -f /var/lib/pgsql/.pgsql_profile ] && source /var/lib/pgsql/.pgsql_profile" > /var/lib/pgsql/.bash_profile chown postgres: /var/lib/pgsql/.bash_profile chmod 700 /var/lib/pgsql/.bash_profile preuninstall scriptlet (using /bin/sh): if [ $1 -eq 0 ] ; then /sbin/service postgresql-11 condstop >/dev/null 2>&1 chkconfig --del postgresql-11 fi postuninstall scriptlet (using /bin/sh): /sbin/ldconfig /sbin/service postgresql-11 condrestart >/dev/null 2>&1 if [ $1 -ge 1 ] ; then /sbin/service postgresql-11 condrestart >/dev/null 2>&1 fi # Create alternatives entries for common binaries and man files Jason Ralph This message contains confidential information and is intended only for the individual named. If you are not the named addresseeyou should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if youhave received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteedto be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete,or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contentsof this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copyversion.
Hi, On Thu, 2019-11-14 at 16:06 +0000, Jason Ralph wrote: > My ultimate goal here is to find out what happens when you yum update a minor > version of postgresql11-server, I would like to know if postgresql11-server > will stop, or do I need to manually do this? PostgreSQL will be restarted automagically, right after old version is removed. Regads, -- Devrim Gündüz Open Source Solution Architect, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Вложения
On Thu, 2019-11-14 at 16:06 +0000, Jason Ralph wrote: > My ultimate goal here is to find out what happens when you yum update > a minor version of postgresql11-server, I would like to know if > postgresql11-server will stop, or do I need to manually do this? Devrim Gündüz <devrim@gunduz.org wrote: >PostgreSQL will be restarted automagically, right after old version is removed. Thanks Devrim, can you help me understand the condstop, is this no longer needed? I cant seem to find that function in theinit script. if [ $1 -eq 0 ] ; then /sbin/service postgresql-11 condstop >/dev/null 2>&1 chkconfig --del postgresql-11 fi Jason Ralph -----Original Message----- From: Devrim Gündüz <devrim@gunduz.org> Sent: Saturday, November 16, 2019 7:13 PM To: Jason Ralph <jralph@affinitysolutions.com>; pgsql-pkg-yum@lists.postgresql.org Subject: Re: yum update minor version | /sbin/service postgresql-11 condstop question Hi, On Thu, 2019-11-14 at 16:06 +0000, Jason Ralph wrote: > My ultimate goal here is to find out what happens when you yum update > a minor version of postgresql11-server, I would like to know if > postgresql11-server will stop, or do I need to manually do this? PostgreSQL will be restarted automagically, right after old version is removed. Regads, -- Devrim Gündüz Open Source Solution Architect, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR This message contains confidential information and is intended only for the individual named. If you are not the named addresseeyou should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if youhave received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteedto be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete,or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contentsof this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copyversion.
<!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } -->
On Thu, 2019-11-14 at 16:06 +0000, Jason Ralph wrote:
> My ultimate goal here is to find out what happens when you yum update
> a minor version of postgresql11-server, I would like to know if
> postgresql11-server will stop, or do I need to manually do this?
Devrim Gündüz <devrim@gunduz.org wrote:
>PostgreSQL will be restarted automagically, right after old version is removed.
Thanks Devrim, can you help me understand the condstop, is this no longer needed? I cant seem to find that function in the init script.
if [ $1 -eq 0 ] ; then
/sbin/service postgresql-11 condstop >/dev/null 2>&1
chkconfig --del postgresql-11
fi
Jason Ralph
From: Jason Ralph <jralph@affinitysolutions.com>
Sent: Monday, November 18, 2019 9:48 PM
To: Devrim Gündüz; pgsql-pkg-yum@lists.postgresql.org
Subject: RE: yum update minor version | /sbin/service postgresql-11 condstop question
Sent: Monday, November 18, 2019 9:48 PM
To: Devrim Gündüz; pgsql-pkg-yum@lists.postgresql.org
Subject: RE: yum update minor version | /sbin/service postgresql-11 condstop question
On Thu, 2019-11-14 at 16:06 +0000, Jason Ralph wrote:
> My ultimate goal here is to find out what happens when you yum update
> a minor version of postgresql11-server, I would like to know if
> postgresql11-server will stop, or do I need to manually do this?
Devrim Gündüz <devrim@gunduz.org wrote:
>PostgreSQL will be restarted automagically, right after old version is removed.
Thanks Devrim, can you help me understand the condstop, is this no longer needed? I cant seem to find that function in the init script.
if [ $1 -eq 0 ] ; then
/sbin/service postgresql-11 condstop >/dev/null 2>&1
chkconfig --del postgresql-11
fi
Jason Ralph
-----Original Message-----
From: Devrim Gündüz <devrim@gunduz.org>
Sent: Saturday, November 16, 2019 7:13 PM
To: Jason Ralph <jralph@affinitysolutions.com>; pgsql-pkg-yum@lists.postgresql.org
Subject: Re: yum update minor version | /sbin/service postgresql-11 condstop question
Hi,
On Thu, 2019-11-14 at 16:06 +0000, Jason Ralph wrote:
> My ultimate goal here is to find out what happens when you yum update
> a minor version of postgresql11-server, I would like to know if
> postgresql11-server will stop, or do I need to manually do this?
PostgreSQL will be restarted automagically, right after old version is removed.
Regads,
--
Devrim Gündüz
Open Source Solution Architect, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
> My ultimate goal here is to find out what happens when you yum update
> a minor version of postgresql11-server, I would like to know if
> postgresql11-server will stop, or do I need to manually do this?
Devrim Gündüz <devrim@gunduz.org wrote:
>PostgreSQL will be restarted automagically, right after old version is removed.
Thanks Devrim, can you help me understand the condstop, is this no longer needed? I cant seem to find that function in the init script.
if [ $1 -eq 0 ] ; then
/sbin/service postgresql-11 condstop >/dev/null 2>&1
chkconfig --del postgresql-11
fi
Jason Ralph
-----Original Message-----
From: Devrim Gündüz <devrim@gunduz.org>
Sent: Saturday, November 16, 2019 7:13 PM
To: Jason Ralph <jralph@affinitysolutions.com>; pgsql-pkg-yum@lists.postgresql.org
Subject: Re: yum update minor version | /sbin/service postgresql-11 condstop question
Hi,
On Thu, 2019-11-14 at 16:06 +0000, Jason Ralph wrote:
> My ultimate goal here is to find out what happens when you yum update
> a minor version of postgresql11-server, I would like to know if
> postgresql11-server will stop, or do I need to manually do this?
PostgreSQL will be restarted automagically, right after old version is removed.
Regads,
--
Devrim Gündüz
Open Source Solution Architect, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.