Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] Postgresql errors out
@ 2019-07-27 20:21 voidlinux-github
  2019-07-28  8:32 ` Postgresql is not correctly initialzed after install voidlinux-github
  2019-07-30 19:30 ` voidlinux-github
  0 siblings, 2 replies; 3+ messages in thread
From: voidlinux-github @ 2019-07-27 20:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 847 bytes --]

New issue by Anachron on void-packages repository

https://github.com/void-linux/void-packages/issues/13377
Description: ### System

* xuname:  
`Void 4.19.53_1 x86_64 GenuineIntel uptodate rFF`
* package:  
`postgresql-9.6.14_1`

### Expected behavior
- Install `postgresql`
- Link service
- Profit

### Actual behavior
- Service does not start, manually running it gives:
```
LOG:  skipping missing configuration file "/var/lib/postgresql/data/postgresql.auto.conf"
FATAL:  "/var/lib/postgresql/data" is not a valid data directory
DETAIL:  File "/var/lib/postgresql/data/PG_VERSION" is missing.
```

### Steps to reproduce the behavior
See `Expected behavior`.

### Reason
Postgresql requires one to run `initdb`. The default installation should run this automatically after install or give a warning in `INSTALL.msg`.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Postgresql is not correctly initialzed after install
  2019-07-27 20:21 [ISSUE] Postgresql errors out voidlinux-github
@ 2019-07-28  8:32 ` voidlinux-github
  2019-07-30 19:30 ` voidlinux-github
  1 sibling, 0 replies; 3+ messages in thread
From: voidlinux-github @ 2019-07-28  8:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

New comment by jnbr on void-packages repository

https://github.com/void-linux/void-packages/issues/13377#issuecomment-515743913
Comment:
Do you have a log from the first run? (the postgres service logs to syslog)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Postgresql is not correctly initialzed after install
  2019-07-27 20:21 [ISSUE] Postgresql errors out voidlinux-github
  2019-07-28  8:32 ` Postgresql is not correctly initialzed after install voidlinux-github
@ 2019-07-30 19:30 ` voidlinux-github
  1 sibling, 0 replies; 3+ messages in thread
From: voidlinux-github @ 2019-07-30 19:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2592 bytes --]

New comment by knusbaum on void-packages repository

https://github.com/void-linux/void-packages/issues/13377#issuecomment-516560471
Comment:
Hmm. I wasn't able to reproduce this from a clean postgres install.
`Void 4.19.59_1 x86_64 GenuineIntel uptodate rmFFFFFFFFFFFF`
`postgresql-9.6.14_1`

After install:
```
$ sudo ln -s /etc/sv/postgresql /var/service/
...
$ sudo sv status postgresql
run: postgresql: (pid 4052) 289s; run: log: (pid 4051) 289s
$ sudo su postgres -c psql  
psql (9.6.14)
Type "help" for help.

postgres=#
```
Before installing `/var/lib/postgresql` did not exist. After linking the service, `/var/lib/postgresql/data` exists and is populated properly.


## Reproducing
If I start with an existing `/var/lib/postgresql/data` directory that's empty, then link the service, I get errors:
```
$ sudo ls -alh /var/lib/postgresql/data
total 0
drwx------ 2 postgres postgres  6 Jul 30 14:25 .
drwxr-x--- 3 postgres postgres 39 Jul 30 14:24 ..
$ sudo ln -s /etc/sv/postgresql /var/service/
$ sudo sv status postgresql                  
down: postgresql: 1s, normally up, want up; run: log: (pid 12664) 12s
$ sudo svlogtail | grep postgres
2019-07-30T19:27:41.29180 daemon.info: Jul 30 14:27:41 postgres: postgres: could not access the server configuration file "/var/lib/postgresql/data/postgresql.conf": No such file or directory
2019-07-30T19:27:42.29694 daemon.info: Jul 30 14:27:42 postgres: postgres: could not access the server configuration file "/var/lib/postgresql/data/postgresql.conf": No such file or directory
2019-07-30T19:27:43.30463 daemon.info: Jul 30 14:27:43 postgres: postgres: could not access the server configuration file "/var/lib/postgresql/data/postgresql.conf": No such file or directory
2019-07-30T19:27:44.31350 daemon.info: Jul 30 14:27:44 postgres: postgres: could not access the server configuration file "/var/lib/postgresql/data/postgresql.conf": No such file or directory
2019-07-30T19:27:45.32417 daemon.info: Jul 30 14:27:45 postgres: postgres: could not access the server configuration file "/var/lib/postgresql/data/postgresql.conf": No such file or directory
2019-07-30T19:27:46.33308 daemon.info: Jul 30 14:27:46 postgres: postgres: could not access the server configuration file "/var/lib/postgresql/data/postgresql.conf": No such file or directory
```

While these aren't the same errors you reported, could it be that you have a dirty `/var/lib/postgresql/data` directory on your machine? Maybe we want to check the directory in the startup script rather than assuming it's good if it exists?


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-30 19:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-27 20:21 [ISSUE] Postgresql errors out voidlinux-github
2019-07-28  8:32 ` Postgresql is not correctly initialzed after install voidlinux-github
2019-07-30 19:30 ` voidlinux-github

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).