How to determine Payment Processor for "pending" transactions (via SQL or otherwise)?
Below query should give you all pending contributions from payment processor
SELECT cc.id, cc.contact_id, cc.total_amount, cpp.title, 
  cc.receive_date, cft.trxn_date, cc.invoice_id, cc.invoice_number, cc.trxn_id
FROM civicrm_contribution cc 
  INNER JOIN civicrm_entity_financial_trxn ceft
    ON ceft.entity_id = cc.id AND ceft.entity_table = 'civicrm_contribution'
  INNER JOIN civicrm_financial_trxn cft
    ON cft.id = ceft.financial_trxn_id
  INNER JOIN civicrm_payment_processor cpp
    ON cpp.id = cft.payment_processor_id
WHERE cc.contribution_status_id = 2 AND cc.is_pay_later = 0;