Yes David - the problem here is expected data hasn't made it from the primary to the standby even after streaming is started , and there could be many reasons for it.
I will be interested to know -
- How user created standby (pg_basebackup etc.)
- Was there any manual cleanup done on the standby pg_xlog directory?
- Is the walreceiver process running on standby? --> ps -ef | grep postgres
- Is the walsender process running on master ? --> ps -ef | grep postgres
- postgresql.auto.conf file
- Database system identifier for both master and standby ( use utility - pg_controldata -D <master/standby data dir> liek - pg_controldata -D /user/app/master)
I would do below to narrow down the issue-
- Stop postgres on standby or kill the postmaster process.
- Increase logging on standby
- Restart standby.
- Check standby log for status and error.
- Check connectivity between both primary and standby server- try connecting to primary as per credentials in primary_conninfo ( psql -h 172.31.37.228 -p 5333 -U postgres -d postgres)
- Check walreceiver process running on standby and the walsender process running on master.
- Checkpoint and switch wal on master
- Check logs and standby status
Share how above goes and also log files from both master and standby.
Regards
Rajni