On 6/1/19 3:56 PM, Tom K wrote:
>
>
>
> postgres=# select oid, datname from pg_database ;
> oid | datname
> -------+-----------
> 13806 | postgres
> 1 | template1
> 13805 | template0
> (3 rows)
>
So there are only the system databases available
> -bash-4.2$ cd /data/patroni/
> -bash-4.2$ ls -altri
> total 144
> 69085037 drwxr-xr-x. 3 root root 20 Oct 23 2018 ..
> 135316997 -rw-------. 1 postgres postgres 206 Oct 29 2018
> backup_label.old
> 201708781 drwx------. 2 postgres postgres 6 Oct 29 2018 pg_commit_ts
> 1502746 drwx------. 2 postgres postgres 6 Oct 29 2018 pg_dynshmem
> 68994449 drwx------. 2 postgres postgres 6 Oct 29 2018 pg_twophase
> 1502749 drwx------. 2 postgres postgres 6 Oct 29 2018 pg_snapshots
> 201708785 drwx------. 2 postgres postgres 6 Oct 29 2018 pg_serial
> 1502747 drwx------. 4 postgres postgres 34 Oct 29 2018 pg_multixact
> 67677559 drwx------. 5 postgres postgres 38 Oct 29 2018 base
base/ is the directory you need to look in. I'm guessing it is only
going to show the oid/ for the three db's above and pgsql_tmp/
For more info on this see:
https://www.postgresql.org/docs/10/storage-file-layout.html
The below looks like the RH package installed data directory. Also looks
like it either has never had initdb run against or the files where removed.
I thought you said you had copied in data directories from the other
nodes, did I remember correctly?
> -bash-4.2$ cd
> -bash-4.2$ cd 10
> -bash-4.2$ ls
> backups data
> -bash-4.2$ pwd
> /var/lib/pgsql/10
> -bash-4.2$ cd data/
> -bash-4.2$ ls -altri
> total 0
> 134734937 drwx------. 4 postgres postgres 31 May 8 06:25 ..
> 245519 drwx------. 2 postgres postgres 6 May 8 06:25 .
> -bash-4.2$ cd ..
> -bash-4.2$ pwd
> /var/lib/pgsql/10
> -bash-4.2$ cd ..
> -bash-4.2$
--
Adrian Klaver
adrian.klaver@aklaver.com