On Thu, 2020-05-14 at 16:26 +0800, Andy Fan wrote: > Thanks, actually I don't know how to use prepared transaction and how it works. > I care about this because there is a long prepared transaction exists in our customer, > and we want to know what this transaction has done(like any data it changed). > All the things I know is the data comes from pg_prepared_xact, but it doesn't help a lot.
Idf you have the transaction ID from "pg_prepared_xact", you could check what locks are held:
SELECT * FROM pg_locks WHERE transactionid = ...;
Than might give you a clue.
Thanks a lot. this transaction only lock a transactionid lock, so I assume there is nothing