diff --git a/flow/e2e/postgres/qrep_flow_pg_test.go b/flow/e2e/postgres/qrep_flow_pg_test.go index ec121b8930..5ee253bf0c 100644 --- a/flow/e2e/postgres/qrep_flow_pg_test.go +++ b/flow/e2e/postgres/qrep_flow_pg_test.go @@ -36,10 +36,47 @@ func (s PeerFlowE2ETestSuitePG) setupSourceTable(tableName string, rowCount int) func (s PeerFlowE2ETestSuitePG) comparePGTables(srcSchemaQualified, dstSchemaQualified, selector string) error { // Execute the two EXCEPT queries - return errors.Join( + err := errors.Join( s.compareQuery(srcSchemaQualified, dstSchemaQualified, selector), s.compareQuery(dstSchemaQualified, srcSchemaQualified, selector), ) + if err != nil { + { + query := fmt.Sprintf("SELECT %s FROM %s ORDER BY id", selector, srcSchemaQualified) + rows, err := s.Conn().Query(context.Background(), query, pgx.QueryExecModeExec) + if err != nil { + return err + } + defer rows.Close() + i := 0 + for rows.Next() { + values, err := rows.Values() + if err != nil { + return err + } + i += 1 + s.T().Log("+++", i, srcSchemaQualified, values) + } + } + { + query := fmt.Sprintf("SELECT %s FROM %s ORDER BY id", selector, srcSchemaQualified) + rows, err := s.Conn().Query(context.Background(), query, pgx.QueryExecModeExec) + if err != nil { + return err + } + defer rows.Close() + i := 0 + for rows.Next() { + values, err := rows.Values() + if err != nil { + return err + } + i += 1 + s.T().Log("+++", i, dstSchemaQualified, values) + } + } + } + return err } func (s PeerFlowE2ETestSuitePG) checkEnums(srcSchemaQualified, dstSchemaQualified string) error {