gpstate
shows that synchronization was not successful. Removing and adding the standby does not help.
20181211:06:13:49:098107 gpstate:mdw:gpadmin-[INFO]:-Starting gpstate with args: -f
20181211:06:13:49:098107 gpstate:mdw:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.7.0 build commit:f7c6eb5cc61b25a7ff9c5a657d6f903befbae013'
20181211:06:13:49:098107 gpstate:mdw:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.7.0 build commit:f7c6eb5cc61b25a7ff9c5a657d6f903befbae013) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Mar 30 2018 14:20:38'
20181211:06:13:49:098107 gpstate:mdw:gpadmin-[INFO]:-Obtaining Segment details from master...
20181211:06:13:50:098107 gpstate:mdw:gpadmin-[INFO]:-Standby master details
20181211:06:13:50:098107 gpstate:mdw:gpadmin-[INFO]:-----------------------
20181211:06:13:50:098107 gpstate:mdw:gpadmin-[INFO]:- Standby address = smdw
20181211:06:13:50:098107 gpstate:mdw:gpadmin-[INFO]:- Standby data directory = /data/master/gpseg-1
20181211:06:13:50:098107 gpstate:mdw:gpadmin-[INFO]:- Standby port = 5116
20181211:06:13:50:098107 gpstate:mdw:gpadmin-[INFO]:- Standby PID = 87329
20181211:06:13:50:098107 gpstate:mdw:gpadmin-[INFO]:- Standby status = Standby host passive
20181211:06:13:50:098107 gpstate:mdw:gpadmin-[INFO]:--------------------------------------------------------------
20181211:06:13:50:098107 gpstate:mdw:gpadmin-[INFO]:--pg_stat_replication
20181211:06:13:50:098107 gpstate:mdw:gpadmin-[INFO]:--------------------------------------------------------------
20181211:06:13:50:098107 gpstate:mdw:gpadmin-[INFO]:-No entries found.
20181211:06:13:50:098107 gpstate:mdwa:gpadmin-[INFO]:--------------------------------------------------------------
The following error message is produced in the standby master log:
2018-12-11 11:10:56.238440 GMT,,,p87335,th1165748096,,,,0,,,seg-1,,,,,"ERROR","XX000","could not connect to the primary server: FATAL: invalid command-line argument for server process: dbname=replication (gp_libpqwalreceiver.c:76)","HINT: Try ""postgres --help"" for more information.",,,,,,0,,"gp_libpqwalreceiver.c",76,"Stack trace: 1 0x957d6b postgres errstart (elog.c:521) 2 0x7f93b2 postgres walrcv_connect (gp_libpqwalreceiver.c:73) 3 0x7fd03d postgres WalReceiverMain (walreceiver.c:322) 4 0x584563 postgres AuxiliaryProcessMain (bootstrap.c:493) 5 0x7caf1b postgres <symbol not found> (postmaster.c:7352) 6 0x7cc312 postgres <symbol not found> (postmaster.c:7445) 7 0x7f02418bf680 libpthread.so.0 <symbol not found> + 0x418bf680 8 0x7f0240d2cbe3 libc.so.6 __select + 0x13 9 0x7d2e57 postgres <symbol not found> (postmaster.c:2349) 10 0x7d5eea postgres PostmasterMain (postmaster.c:1533) 11 0x4c8e07 postgres main (main.c:206) 12 0x7f0240c593d5 libc.so.6 __libc_start_main + 0xf5 13 0x4c935c postgres <symbol not found> + 0x4c935c "
MASTER_DATA_DIRECTORY/recovery.conf
.
standby_mode = 'on'
primary_conninfo = 'user=gpadmin host=mdw port=5116 options=''-c client_min_messages=ERROR'' sslmode=prefer sslcompression=1 krbsrvname=postgres'
Important Note: Observe the quotes used with options
in the recovery.conf file.
3. Remove the offending entry with quotes:
standby_mode = 'on' primary_conninfo = 'user=gpadmin host=mdw port=5116 sslmode=prefer sslcompression=1 krbsrvname=postgres'