Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634482 - postgresql-9.5/9.6 does not work with elogind
Summary: postgresql-9.5/9.6 does not work with elogind
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-16 19:48 UTC by godlike64
Modified: 2018-01-10 11:24 UTC (History)
0 users

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


Attachments
postmaster.log with debug5, showing how postgres starts up normally then immediately shuts down, also normally (postmaster.log,8.39 KB, text/x-log)
2017-10-16 19:48 UTC, godlike64
Details

Note You need to log in before you can comment on or make changes to this bug.
Description godlike64 2017-10-16 19:48:16 UTC
Created attachment 498902 [details]
postmaster.log with debug5, showing how postgres starts up normally then immediately shuts down, also normally

Whenever elogind is used (current version tested: sys-auth/elogind-234.4), postgres silently fails to start, both 9.5 and 9.6.

'/etc/init.d/postgresql-9.X start' shows no errors and it would appear postgres started, but there is no process in the process list, and then the initscript has to be 'zapped' (since the PID was written but it's not running).

Attaching a debugging (debug5) log of postgres to this bug. Around line 110 is when postgres, after starting up, decides to shutdown (cleanly). To confirm, yes, postgres starts up fine (there was no problem with the database whatsoever, and even tried versions 9.5 and 9.6) and then gracefully shuts down, right after starting.

Postgres can start manually just fine, with the same options as in the initscript, if run directly from the postgres user. This issue goes away when switching back to consolekit (no other actions taken on the database).
Comment 1 Aaron W. Swenson gentoo-dev 2017-10-18 10:55:24 UTC
Which init system are you using (OpenRC, systemd, other)?

What do the logs for the init system contain?
Comment 2 godlike64 2017-10-18 16:20:21 UTC
(In reply to Aaron W. Swenson from comment #1)
> Which init system are you using (OpenRC, systemd, other)?
> 
> What do the logs for the init system contain?

I'm using OpenRC but I have nothing on /var/log/messages nor on /var/log/rc.log. I noticed I had rc_logger="NO". Would setting it to "YES" and reproducing the issue suffice?
Comment 3 Aaron W. Swenson gentoo-dev 2017-10-18 16:58:38 UTC
(In reply to godlike64 from comment #2)
> (In reply to Aaron W. Swenson from comment #1)
> > Which init system are you using (OpenRC, systemd, other)?
> > 
> > What do the logs for the init system contain?
> 
> I'm using OpenRC but I have nothing on /var/log/messages nor on
> /var/log/rc.log. I noticed I had rc_logger="NO". Would setting it to "YES"
> and reproducing the issue suffice?

I would hope so.
Comment 4 godlike64 2017-10-23 18:12:23 UTC
Sorry for the delay, I haven't been able to get to this yet as I have to recompile against elogind on the machine I noticed this. I expect to get to it in the next couple of days.
Comment 5 Andreas Sturmlechner gentoo-dev 2017-11-20 12:24:47 UTC
Any news here?
Comment 6 godlike64 2018-01-10 08:12:34 UTC
Sorry for the *huge* delay in replying to this.

After the recent Meltdown-related round of updates, I went in to test this once again and, to my surprise, I have Postgres running on an elogind-enabled system.

[I] dev-db/postgresql (9.6.6(9.6)@11/28/2017 10.1(10)@01/10/2018): PostgreSQL RDBMS
[I] sys-auth/elogind (234.4-r1@01/10/2018): The systemd project's logind, extracted to a standalone package

Other than a recent batch of updates and switching yet again to USE="-consolekit elogind" I have no idea what happened, but it works. I am going to stick with elogind for now. If I find any similar issues like this in the future, I'll open a new bug.

Thanks and sorry again for the delay.
Comment 7 Aaron W. Swenson gentoo-dev 2018-01-10 11:24:51 UTC
(In reply to godlike64 from comment #6)
> Sorry for the *huge* delay in replying to this.
> 
> After the recent Meltdown-related round of updates, I went in to test this
> once again and, to my surprise, I have Postgres running on an
> elogind-enabled system.
> 
> [I] dev-db/postgresql (9.6.6(9.6)@11/28/2017 10.1(10)@01/10/2018):
> PostgreSQL RDBMS
> [I] sys-auth/elogind (234.4-r1@01/10/2018): The systemd project's logind,
> extracted to a standalone package
> 
> Other than a recent batch of updates and switching yet again to
> USE="-consolekit elogind" I have no idea what happened, but it works. I am
> going to stick with elogind for now. If I find any similar issues like this
> in the future, I'll open a new bug.
> 
> Thanks and sorry again for the delay.

Thanks for getting back to this.

I'm glad it works now. I'm changing the status of this bug to WORKSFORME since it works for you.

If something does go haywire, you can reopen this bug.