Hi, I tried back-porting my version of this patch to 9.6 to see what would happen there. One problem is that some of the functions have different names before v10. So 9.6 needs this:
- "SELECT pg_walfile_name(pg_current_wal_lsn());"); + "SELECT pg_xlogfile_name(pg_current_xlog_location());"); But there's also another problem, which is that this doesn't work before v12: $node_standby->psql('postgres', 'SELECT pg_promote()'); So I tried changing it to this: $node_standby->promote; But then the test fails, because pg_promote() has logic built into it to wait until the promotion actually happens, but ->promote doesn't, so SELECT pg_walfile_name(pg_current_wal_lsn()) errors out because the system is still in recovery. I'm not sure what to do about that. I quickly tried adding -w to 'sub promote' in PostgresNode.pm, but that didn't fix it, so I guess we'll have to find some other way to wait until the promotion is complete. -- Robert Haas EDB: http://www.enterprisedb.com