Thread: postgresql "init script" for postgres 9.2.15
On 07/13/2016 01:56 PM, Steve Langlois wrote: > > Hi, I've been searching for a 9.2.15 version of the postgresql script > for "init script for starting up the PostgreSQL". I have managed to find > older versions than what we are currently using, 8.2.5 but haven't had > any luck finding a new version in the postgres 9.2.15 rpms. We are > moving from CentOS 5 to CentOS 7 and need to update postgres from 8.2.5 > to 9.2.15. > > Below is the version I have. Where can I find a version of this script > for 9.2.15? Thank you. Given that it is Centos 7 they have moved to systemd: https://wiki.postgresql.org/wiki/YUM_Installation#Startup -- Adrian Klaver adrian.klaver@aklaver.com
Thank you but in our appliance, we are not running postgres as a service, we are running it programatically with this script, call postmaster to start it for instance instead of using the service framework. Is there an equivalent in 9.x or does it now have to run as a service. I was able to modify the script to get 9.2 to run but I was hoping this script had been updated for 9.x. The current script uses --auth='ident sameuser' when calling initdb for instance which is not supported in 9.2.
Steve
steve.langlois@tavve.com
Sent: Wednesday, July 13, 2016 5:11:24 PM
To: Steve Langlois; pgsql-general@postgresql.org
Subject: Re: [GENERAL] postgresql "init script" for postgres 9.2.15
>
> Hi, I've been searching for a 9.2.15 version of the postgresql script
> for "init script for starting up the PostgreSQL". I have managed to find
> older versions than what we are currently using, 8.2.5 but haven't had
> any luck finding a new version in the postgres 9.2.15 rpms. We are
> moving from CentOS 5 to CentOS 7 and need to update postgres from 8.2.5
> to 9.2.15.
>
> Below is the version I have. Where can I find a version of this script
> for 9.2.15? Thank you.
Given that it is Centos 7 they have moved to systemd:
https://wiki.postgresql.org/wiki/YUM_Installation#Startup
--
Adrian Klaver
adrian.klaver@aklaver.com
Thank you but in our appliance, we are not running postgres as a service, we are running it programatically with this script, call postmaster to start it for instance instead of using the service framework. Is there an equivalent in 9.x or does it now have to run as a service.
Steve Langlois <steve.langlois@tavve.com> writes: > Thank you but in our appliance, we are not running postgres as a service, we are running it programatically with this script,call postmaster to start it for instance instead of using the service framework. Is there an equivalent in 9.x ordoes it now have to run as a service. I was able to modify the script to get 9.2 to run but I was hoping this script hadbeen updated for 9.x. The current script uses --auth='ident sameuser' when calling initdb for instance which is not supportedin 9.2. You could try looking in the Fedora 15 RPMs --- that was the last non-systemd Fedora release, I believe. It looks like Fedora was on Postgres 9.0.x at that point, so you might still need to do a bit more fiddling to get it to work with PG 9.2; but it'd be closer than scripts intended for 8.2, for sure. Keep in mind that scripts like this are distro-maintained, not maintained by the Postgres core project; and they tend to get a LOT more churn caused by distro-specific issues than churn caused by Postgres changes. It's not really clear to me that you want to do anything except make whatever changes you have to in the scripts you already have. You may spend more time dealing with useless-to-you changes than you save by not doing your own research on what changed in Postgres. regards, tom lane
On 07/13/2016 02:35 PM, Steve Langlois wrote: > > Thank you but in our appliance, we are not running postgres as a > service, we are running it programatically with this script, call > postmaster to start it for instance instead of using the service > framework. Is there an equivalent in 9.x or does it now have to run as a > service. I was able to modify the script to get 9.2 to run but I was > hoping this script had been updated for 9.x. The current script > uses --auth='ident sameuser' when calling initdb for instance which is > not supported in 9.2. Well first: systemctl enable postgresql-9.4.service would make it a service that starts at boot. If you just want to start and stop on demand then: systemctl start postgresql-9.4.service systemctl stop postgresql-9.4.service If you set on using init.d/ scripts then: https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=contrib/start-scripts/linux;hb=e9dca8ce147f32d7d64a9e64f9d8339310ad6535 > > > Steve > > steve.langlois@tavve.com > > ------------------------------------------------------------------------ > *From:* Adrian Klaver <adrian.klaver@aklaver.com> > *Sent:* Wednesday, July 13, 2016 5:11:24 PM > *To:* Steve Langlois; pgsql-general@postgresql.org > *Subject:* Re: [GENERAL] postgresql "init script" for postgres 9.2.15 > > On 07/13/2016 01:56 PM, Steve Langlois wrote: >> >> Hi, I've been searching for a 9.2.15 version of the postgresql script >> for "init script for starting up the PostgreSQL". I have managed to find >> older versions than what we are currently using, 8.2.5 but haven't had >> any luck finding a new version in the postgres 9.2.15 rpms. We are >> moving from CentOS 5 to CentOS 7 and need to update postgres from 8.2.5 >> to 9.2.15. >> >> Below is the version I have. Where can I find a version of this script >> for 9.2.15? Thank you. > > Given that it is Centos 7 they have moved to systemd: > > https://wiki.postgresql.org/wiki/YUM_Installation#Startup > > > -- > Adrian Klaver > adrian.klaver@aklaver.com -- Adrian Klaver adrian.klaver@aklaver.com
Hi, On Wed, 2016-07-13 at 20:56 +0000, Steve Langlois wrote: > I've been searching for a 9.2.15 version of the postgresql script for "init > script for starting up the PostgreSQL". I have managed to find older versions > than what we are currently using, 8.2.5 but haven't had any luck finding a > new version in the postgres 9.2.15 rpms. We are moving from CentOS 5 to > CentOS 7 and need to update postgres from 8.2.5 to 9.2.15. Here is the 9.6 version: https://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob;f=rpm/redhat/9.6/postgresql/EL-6/postgresql.init;h=daf436ec39f9038a7e3d73c50f80fc3492be15a1;hb=HEAD You just need to change stuff starting line 92: https://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob;f=rpm/redhat/9.6/postgresql/EL-6/postgresql.init;h=daf436ec39f9038a7e3d73c50f80fc3492be15a1;hb=HEAD#l92 -HTH. Regards, -- Devrim GÜNDÜZ Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR