diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
index 32ee98aebc..3403626f92 100644
--- a/src/test/perl/PostgreSQL/Test/Cluster.pm
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -2948,6 +2948,13 @@ sub wait_for_catchup
 		}
 		else
 		{
+			# Fetch additional detail for debugging purposes
+			$query = qq[SELECT application_name, ${mode}_lsn, state
+						FROM pg_catalog.pg_stat_replication
+						WHERE application_name IN ('$standby_name', 'walreceiver')];
+			my $details = $self->safe_psql('postgres', $query);
+			diag qq(Last application_name|${mode}_lsn|state:
+${details});
 			croak "timed out waiting for catchup";
 		}
 	}
