Francisco Reyes <lists(at)stringsutils(dot)com> writes:
> The two records I always see are:
> locktype |....| mode | granted
> ---------------+....+-----------------+---------
> transactionid |....| ExclusiveLock | t
> relation |....| AccessShareLock | t
That would be your own transaction's lock on its own XID, and its share
lock on the pg_locks view. Joining to pg_database.oid and pg_class.oid
will help you interpret the numbers --- see
http://www.postgresql.org/docs/8.1/static/view-pg-locks.html
regards, tom lane