Re: postgresql "init script" for postgres 9.2.15

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Steve Langlois <steve(dot)langlois(at)tavve(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: postgresql "init script" for postgres 9.2.15
Date: 2016-07-14 00:06:33
Message-ID: 8b202860-46b8-89a6-9828-75b935dbfae3@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(dot)langlois(at)tavve(dot)com
>
> ------------------------------------------------------------------------
> *From:* Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
> *Sent:* Wednesday, July 13, 2016 5:11:24 PM
> *To:* Steve Langlois; pgsql-general(at)postgresql(dot)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(dot)klaver(at)aklaver(dot)com

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nick Babadzhanian 2016-07-14 07:50:48 Re: pglogical cascading replication (chaining replication)
Previous Message Tom Lane 2016-07-13 22:42:51 Re: pg_restore out of memory