[plug] Postgresql 9.4 on Debian Jessie

Onno Benschop onno at itmaze.com.au
Fri Sep 12 13:53:53 UTC 2014


Remember to file a bug report and submit your config files as examples!

--
finger painting on glass is an inexact art - apologies for any errors in
this scra^Hibble

()/)/)() ..ASCII for Onno..
On 12 Sep 2014 21:50, "Marcus Holmes" <mh at marcusholmes.biz> wrote:

> you beauty! thanks a lot, after a couple of hours messing around with
> paths (and trying to find the check_db utility, which doesn't appear to
> have made it to the debian package) it all seems to work now :)
>
> thanks :)
>
> On 12 September 2014 09:07, Rob <rob at mrrob.info> wrote:
>
>> On 11/09/14 18:07, Marcus Holmes wrote:
>>
>>> so I was happily on 9.3 and then I moved to Jessie (so I could get
>>> Docker working, a whole other story), which upgraded me to 9.4, but the
>>> upgrade flunked the database upgrade so I was left running mismatched
>>> versions of database and server (or something... it wasn't happy
>>> anyway). So. nuke the site from orbit, purge everything and start again.
>>> Lucky it was all just dev and test databases.
>>>
>>> But, and here's the problem: Jessie uses systemd and the 9.4 install
>>> doesn't seem to actually create the .service files needed to kick the
>>> server off on boot (it does come with a lovely init.d script that then
>>> doesn't appear to get called by systemd). And I can't find a decent
>>> guide to writing .service files for 9.4 anywhere.
>>>
>>> Anyone know of a way of either getting systemd to call the init.d
>>> script, or better yet, a decent guide for the uninitiated on writing a
>>> .service file?
>>>
>>> Thanks in advance for any help...
>>>
>>> Marcus
>>>
>>>
>>>
>>> _______________________________________________
>>> PLUG discussion list: plug at plug.org.au
>>> http://lists.plug.org.au/mailman/listinfo/plug
>>> Committee e-mail: committee at plug.org.au
>>> PLUG Membership: http://www.plug.org.au/membership
>>>
>>>
>> I can't give any advice as to where to learn to write them but below is
>> the Arch Linux postgresql-testing(ver. 9.4beta2) postgresql.service file.
>> I retrieved it from: https://aur.archlinux.org/packages/po/postgresql-
>> testing/postgresql-testing.tar.gz. I'm sure you could make a basic one
>> to execute the init.d scripts if this doesn't work.
>>
>> [Unit]
>> Description=PostgreSQL database server
>> After=network.target
>>
>> [Service]
>> Type=forking
>> TimeoutSec=120
>> User=postgres
>> Group=postgres
>>
>> Environment=PGROOT=/var/lib/postgres
>>
>> SyslogIdentifier=postgres
>> PIDFile=/var/lib/postgres/data/postmaster.pid
>>
>> ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data
>> ExecStart= /usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120
>> ExecReload=/usr/bin/pg_ctl -s -D ${PGROOT}/data reload
>> ExecStop=  /usr/bin/pg_ctl -s -D ${PGROOT}/data stop -m fast
>>
>> # Due to PostgreSQL's use of shared memory, OOM killer is often
>> overzealous in
>> # killing Postgres, so adjust it downward
>> OOMScoreAdjust=-200
>>
>> [Install]
>> WantedBy=multi-user.target
>>
>>
>> ---
>> mrrob
>> ---
>> _______________________________________________
>> PLUG discussion list: plug at plug.org.au
>> http://lists.plug.org.au/mailman/listinfo/plug
>> Committee e-mail: committee at plug.org.au
>> PLUG Membership: http://www.plug.org.au/membership
>>
>
>
> _______________________________________________
> PLUG discussion list: plug at plug.org.au
> http://lists.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.org.au
> PLUG Membership: http://www.plug.org.au/membership
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20140912/d49d8b77/attachment.html>


More information about the plug mailing list