On 21-04-2017 20:55, Adrian Klaver wrote:
On 04/21/2017 04:20 PM, Edson Lidorio wrote:
On 21-04-2017 18:13, Edson Lidorio wrote:
What does the directory listing for /var/lib/pgsql/9.6/data show?
[root@localhost data]# pwd
/var/lib/pgsql/9.6/data
Ls -la /var/lib/pgsql/9.6/data
drwx------. 20 postgres postgres 4096 Abr 21 17:52 .
drwx------. 4 root root 51 Abr 21 06:33 ..
-rw-------. 1 postgres postgres 0 Abr 21 06:33
ArquivoASerCriado.dmp
drwx------. 44 postgres postgres 4096 Abr 21 06:32 base
drwx------. 2 postgres postgres 4096 Abr 21 06:32 global
drwx------. 2 postgres postgres 18 Abr 21 06:32 pg_clog
drwx------. 2 postgres postgres 6 Abr 21 06:32 pg_commit_ts
drwx------. 2 postgres postgres 6 Abr 21 06:32 pg_dynshmem
-rw-------. 1 postgres postgres 4345 Abr 21 06:33 pg_hba.conf
-rw-------. 1 postgres postgres 1636 Abr 21 06:33 pg_ident.conf
drwx------. 2 postgres postgres 188 Abr 21 06:32 pg_log
drwx------. 4 postgres postgres 39 Abr 21 06:32 pg_logical
drwx------. 4 postgres postgres 36 Abr 21 06:32 pg_multixact
drwx------. 2 postgres postgres 18 Abr 21 06:32 pg_notify
drwx------. 2 postgres postgres 6 Abr 21 06:32 pg_replslot
drwx------. 2 postgres postgres 6 Abr 21 06:32 pg_serial
drwx------. 2 postgres postgres 6 Abr 21 06:32 pg_snapshots
drwx------. 2 postgres postgres 4096 Abr 21 06:32 pg_stat
drwx------. 2 postgres postgres 6 Abr 21 06:32 pg_stat_tmp
drwx------. 2 postgres postgres 18 Abr 21 06:32 pg_subtrans
drwx------. 2 postgres postgres 84 Abr 21 06:32 pg_tblspc
drwx------. 2 postgres postgres 6 Abr 21 06:32 pg_twophase
-rw-------. 1 postgres postgres 4 Abr 21 06:33 PG_VERSION
drwx------. 3 postgres postgres 4096 Abr 21 06:33 pg_xlog
-rw-------. 1 postgres postgres 88 Abr 21 06:33 postgresql.auto.conf
-rw-------. 1 postgres postgres 22289 Abr 21 06:33 postgresql.conf
-rw-------. 1 postgres postgres 60 Abr 21 06:33 postmaster.opts
Ensure you actually have a folder named "/var/lib/pgsql/9.6/data"
with your
database in it (not, possibly, a folder named "date" per your original
message).
[root@localhost 9.6]# du -hs *
0 backups
4,2G data
4,0K initdb.log
chown -R postgres:postgres /var/lib/pgsql/9.6/data
systemctl start postgresql-9.6.service
Job for postgresql-9.6.service failed because the control process exited
with error code. See "systemctl status postgresql-9.6.service" and
"journalctl -xe" for details.
restorecon -R /var/lib/pgsql/9.6/data
Apr 21 19:11:58 localhost systemd: Starting PostgreSQL 9.6 database
server...
Apr 21 19:11:58 localhost postgresql96-check-db-dir:
"/var/lib/pgsql/9.6/data/" is missing or empty.
Apr 21 19:11:58 localhost postgresql96-check-db-dir: Use
"/usr/pgsql-9.6/bin/postgresql96-setup initdb" to initialize the
database cluster.
Apr 21 19:11:58 localhost postgresql96-check-db-dir: See
/usr/share/doc/postgresql96/README.rpm-dist for more information.
Apr 21 19:11:58 localhost systemd: postgresql-9.6.service: control
process exited, code=exited status=1
Apr 21 19:11:58 localhost systemd: Failed to start PostgreSQL 9.6
database server.
Apr 21 19:11:58 localhost systemd: Unit postgresql-9.6.service entered
failed state.
Apr 21 19:11:58 localhost systemd: postgresql-9.6.service failed.
If it still won't start after that, please do an "ls -alRZ
/var/lib/pgsql/9.6", pastebin the output, and send the link.
Download Link: http://myaccount.dropsend.com/file/2714afb84f8ecadd
Not sure it applies here, but I see that in the above file you have
tablespace links.
Are those tablespaces actually there?
Can you find postgresql96-check-db-dir and see what it is looking for?
The tablespace exists I have restored in the same directory that was
/var/tablespace_pgsql
chown -R postgres:postgres /var/tablespace_pgsql/
chmod 700 /var/tablespace_pgsql/
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general