Subscribed unsubscribe Subscribe Subscribe

hasen's tech life

Twitter: @hasen

OSXをEl Capitan GMにアップデートしたらPostgreSQLが起動しなかったので対応.

PostgreSQL OSX El Capitan

# OSXをEl Capitan GMにアップデートしたらPostgreSQLが起動しなかったので対応.

# FATALエラーで出力されるディレクトリを順番に作っていった.
$ postgres -D /usr/local/var/postgres
> FATAL: could not open directory "pg_tblspc": No such file or directory
> FATAL: could not open directory "pg_replslot": No such file or directory
> FATAL: could not open directory "pg_twophase": No such file or directory
> FATAL: could not open directory "pg_stat_tmp": No such file or directory
> FATAL: could not open directory "pg_logical/snapshots": No such file or directory
> FATAL: could not open directory "pg_logical/mappings": No such file or directory

# ディレクトリを作成
$ mkdir /usr/local/var/postgres/pg_tblspc
$ mkdir /usr/local/var/postgres/pg_replslot
$ mkdir /usr/local/var/postgres/pg_twophase
$ mkdir /usr/local/var/postgres/pg_stat_tmp
$ mkdir -p /usr/local/var/postgres/pg_logical/snapshots
$ mkdir /usr/local/var/postgres/pg_logical/mappings

# 起動
$ postgres -D /usr/local/var/postgres
> ... (略)

# 確認
$ ps aux | grep postgre[s]
> /usr/local/Cellar/postgresql/9.4.4/bin/postgres
> postgres: autovacuum launcher process
> postgres: wal writer process
> postgres: writer process
> postgres: checkpointer process
> postgres: stats collector process