Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383471 - dev-db/postgresql-server: init script should recreate /var/run/postgresql if missing (/var/run on tmpfs)
Summary: dev-db/postgresql-server: init script should recreate /var/run/postgresql if ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-18 11:16 UTC by Jens Rutschmann
Modified: 2011-12-08 03:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Rutschmann 2011-09-18 11:16:47 UTC
On systems where /var/run is on tmpfs, the postgresql-server init script fails to start the postgres server because it does not recreate /var/run/postgresql if it is missing.

I have /var/run on a tmpfs to save writes on my SSD.

Please consider adding the following lines to the checkconfig() function in the init script. Thanks !


        if [ ! -d "/var/run/postgresql" ] ; then
                mkdir /var/run/postgresql
        fi
        chown postgres:postgres /var/run/postgresql


Reproducible: Always
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-11-29 16:16:34 UTC
Even better:

checkpath -d -m 0770 -o postgres:postgres /var/run/postgresql

This is the only thing needed to get this to work. And please consider that with the idea of migrating /run, this starts to be more a common situation than you could ignore.
Comment 2 Aaron W. Swenson gentoo-dev 2011-11-29 23:59:18 UTC
(In reply to comment #1)
> Even better:
> 
> checkpath -d -m 0770 -o postgres:postgres /var/run/postgresql
> 
> This is the only thing needed to get this to work. And please consider that
> with the idea of migrating /run, this starts to be more a common situation than
> you could ignore.

Yeah, that's what I'm going to go with now. I just saw that this morning.
Comment 3 Aaron W. Swenson gentoo-dev 2011-12-08 03:17:14 UTC
  08 Dec 2011; Aaron W. Swenson <titanofold@gentoo.org>
  +postgresql-server-8.2.23.ebuild, +postgresql-server-8.3.17.ebuild,
  +postgresql-server-8.4.10.ebuild, +postgresql-server-9.0.6.ebuild,
  +postgresql-server-9.1.2.ebuild:
  Version bump. Fixes bugs 391851, 383471, and 378865.