
My simple benchmark is far from rigorous. 2 Each transaction leaves its target table empty to avoid any loss in performance that might be caused by accumulated data. To combat this, there is an alternative mode: "transaction pooling", which only uses a Postgres server connection for the duration of each transaction. However, with this setup, if you have a large number of idle clients connected to PgBouncer you'll have to maintain an equal number of (expensive) idle connections on your Postgres server. If the output is more than one hour than this is a point of worry. Long-running transactions prevents PostgreSQL from vaccum-ing old data, it may shutdown the database due to transaction ID(xid) wraparound. Transactions should be short so that it can get executed within a minute.

Para saber cuáles son las tablas de la base de datos que tienen los bloqueos, en psql puede ejecutar, como encuentra en [2. De ahi puede saberse que el proceso cuyo pid es 6795 esta sin problemas, pero el proceso 6819 se encuentra con una transaccion inconclusa.

Idle: This means that the link is inactive, so we must keep a record of them depending on how long they've been idle.
