root page 3 of index "pg_class_oid_index" has level 0, expected 1

2019-11-13 Thread Abhijit Gharami
Hi,

During major version upgrade from PostgreSQL v9.4 to v9.6 I facing
following error:

Performing Consistency Checks
-
Checking cluster versions   ok

connection to database failed: FATAL:  root page 3 of index
"pg_class_oid_index" has level 0, expected 1


could not connect to old postmaster started with the command:
"/postgresql94/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D
"/data/directory/postgresql" -o "-p 5432 -b  -c listen_addresses='' -c
unix_socket_permissions=0700 -c
unix_socket_directories='/home/postgresql_user'" start
Failure, exiting


Again, I was trying to take the pg_dumpall of the same database
cluster(PostgreSQL v9.4) and it failed with error:
pg_dump: [archiver (db)] connection to database "template1" failed: FATAL:
 root page 3 of index "pg_class_oid_index" has level 0, expected 1
pg_dumpall: pg_dump failed on database "template1", exiting

Please suggest how should I proceed with major version upgrade in this case.

Regards,
Abhijit


PITR based recovery in a primary/standby cluster setup

2019-05-21 Thread Abhijit Gharami
Hi,

We have primary and standby PostgreSQL cluster setup and also we have PITR
enabled on it. To improve the recovery time we are thinking of recovering
the database to both primary and standby at the same time.

These are the steps we are following:
  1. Restore the base backup to the both primary and standby server
  2. Replay the WAL files on both primary and standby and once the recovery
target is reached stop the servers
  3. Start one of the server as Primary and other one as standby


We have followed the above steps but when we are trying to start the
servers as primary and standby we are having replication issues.

Could you please suggest what should be done here so that we can recover
the database in both primary as well as in  standby server?

We are using PostgrerSQL version: 9.6.12 and for PITR we are using WAL-E.

Regards,
Abhijit