GNU bug report logs - #22619
postgresql-service error checking wtf

Previous Next

Package: guix;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Wed, 10 Feb 2016 19:02:02 UTC

Severity: normal

Tags: moreinfo

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 22619 <at> debbugs.gnu.org
Subject: bug#22619: postgresql-service error checking wtf
Date: Fri, 12 Feb 2016 20:48:58 +0100
Hi,

I've found out some more details. The message 
 
> > initdb: directory "/var/lib/postgresql/data" exists but is not empty
> > If you want to create a new database system, either remove or empty
> > the directory "/var/lib/postgresql/data" or run initdb
> > with an argument other than "/var/lib/postgresql/data".

is not an error for the entire service. It's initdb refusing to clobber the existing database (which has been created by the postgresql-service instance with no #:config-file argument) and helpful in preventing data loss.

The actual problem only arises because guix reconfigure doesn't deem a change in service arguments as reason to restart (or reconfigure) a service.

I.e. before, my config was:

(postgresql-service )

Then I did guix reconfigure ...

Afterwards, I changed the config to:

(postgresql-service #:config-file ...)

Then I did giux reconfigure   # this erroneously doesn't reload the postgres service!!

> > and the error message still references the default config file.  
> 
> I don’t see any references to a config file in what you pasted.

In the postgres-service definition in guix/gnu/services/databases.scm , there's a %default-postgres-config . That's what I meant.
At all times, the default config file was printed in the log - which was because the postgres service never actually was reconfigured.

>I’ve tested ‘postgresql-service’ in a pristine system with ‘guix system vm’ and it starts without any such message.  So I guess there’s stale data in /var/lib/postgresql/data on your system?

It was left over from the first unsuccessful launch because bug# 22618 hadn't been fixed at the time.

Thanks,
   Danny




This bug report was last modified 9 years and 94 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.