Mailinglist Archive: opensuse-factory (1324 mails)

< Previous Next >
Re: [opensuse-factory] Tumbleweed: how to "enable" (run at boot) postgresql 9.4.4 service.. [GPG signed]
On Sunday 11 October 2015 10.33:52 André Verwijs wrote:

Tumbleweed: how to "enable" (run at boot) PostgrwSQL 9.4.4 service

when i run....

OpenSUSE-TW:~ # systemctl enable postgresql.service

postgresql.service is not a native service, redirecting to
Executing /usr/lib/systemd/systemd-sysv-install enable postgresql
Failed to execute /usr/lib/systemd/systemd-sysv-install: No such file or

when i start postgresql, it works great.....

OpenSUSE-TW:~ # service postgresql start

OpenSUSE-TW:~ # systemctl status postgresql.service

postgresql.service - LSB: Start the PostgreSQL master daemon
Loaded: loaded (/etc/init.d/postgresql)
Active: active (exited) since Sun 2015-10-11 09:49:08 CEST; 2s ago
Docs: man:systemd-sysv-generator(8)

Process: 3781 ExecStart=/etc/init.d/postgresql start (code=exited,
Oct 11 09:49:07 OpenSUSE-TW systemd[1]: Starting LSB: Start the
PostgreSQL master daemon...
Oct 11 09:49:07 OpenSUSE-TW su[3793]: (to postgres) root on none
Oct 11 09:49:07 OpenSUSE-TW su[3793]: pam_unix(su-l:session): session
opened for user postgres by (uid=0)
Oct 11 09:49:07 OpenSUSE-TW su[3831]: (to postgres) root on none
Oct 11 09:49:07 OpenSUSE-TW su[3831]: pam_unix(su-l:session):
sessionopened for user postgres by (uid=0)
Oct 11 09:49:08 OpenSUSE-TW systemd[1]: Started LSB: Start the
PostgreSQL master daemon.
Oct 11 09:49:08 OpenSUSE-TW postgresql[3781]: Starting PostgreSQL 9.4.4

for other services there's no problem, so why postgresql can't be
added/activated, i don't know....

tips are welcome...

From where come the 9.4x postgresql package on TW there's no such one in factory

But (at this is the funniest part) it's present in Leap:42.1

Anyway, if you init your database manually correctly you can then use this kind
of service
in /etc/systemd/system


Description=PostgreSQL database server



# Note: avoid inserting whitespace in these Environment= lines, or you may
# break postgresql-setup.

# Port number for server to listen on

# Location of database directory

# Allow all gdal outbound raster drivers

# Where to send early-startup messages from the server (before the logging
# options of postgresql.conf take effect)

# Disable OOM kill on the postmaster

ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o "-p ${PGPORT}" -w -t 300
ExecStop=/usr/bin/pg_ctl stop -D ${PGDATA} -s -m fast
ExecReload=/usr/bin/pg_ctl reload -D ${PGDATA} -s

# Give a reasonable amount of time for the server to start up/shut down


You have to adjust data path and binaries if you have several pg version
But I think you've got the idea.
I'm using this since 9.1 under 12.3 and 9.2 with 13.1 work perfect.


Bruno Friedmann
Ioda-Net Sàrl

openSUSE Member & Board, fsfe fellowship
GPG KEY : D5C9B751C4653227
irc: tigerfoot
< Previous Next >