Re: The Curious Case of the Table-Locking UPDATE Query

2021-07-08 Thread Adrian Klaver
On 7/8/21 12:09 PM, Emiliano Saenz wrote: I can see that you say but the database behavior is like the block is more general than one tuple. It is difficult to get a pg_lock snapshot to determine some access exclusive locks on some tables. Monitoring the database (by Zabbix), when this type of b

Re: The Curious Case of the Table-Locking UPDATE Query

2021-07-08 Thread Emiliano Saenz
I can see that you say but the database behavior is like the block is more general than one tuple. It is difficult to get a pg_lock snapshot to determine some access exclusive locks on some tables. Monitoring the database (by Zabbix), when this type of block appears (AccessExclusiveLock) the CPU co

Re: The Curious Case of the Table-Locking UPDATE Query

2021-07-08 Thread hubert depesz lubaczewski
On Thu, Jul 08, 2021 at 02:35:33PM -0300, Emiliano Saenz wrote: > Attach the files. The pg_locks file doesn't show any access exclusive locks on any table? =$ awk -F, 'NR==1 || $13 == "AccessExclusiveLock"' pg_locks.csv Locktype,Database,Relation,Page,Tuple,Virtualxid,Transactionid,Classid,Objid

Re: The Curious Case of the Table-Locking UPDATE Query

2021-07-06 Thread hubert depesz lubaczewski
On Mon, Jul 05, 2021 at 08:22:39PM -0300, Emiliano Saenz wrote: > We have a huge POSTGRES 9.4 database in the production environment (several > tables have more than 100.000.00 registers). Last two months we have had > problems with CPU utilization. Debugging the locks (on pg_locks) we notice > tha

Re: The Curious Case of the Table-Locking UPDATE Query

2021-07-05 Thread Adrian Klaver
On 7/5/21 4:22 PM, Emiliano Saenz wrote: Hello! We have a huge POSTGRES 9.4 database in the production environment (several tables have more than 100.000.00 registers). Last two months we have had problems with CPU utilization. Debugging the locks (on pg_locks) we notice that sometimes simple

The Curious Case of the Table-Locking UPDATE Query

2021-07-05 Thread Emiliano Saenz
Hello! We have a huge POSTGRES 9.4 database in the production environment (several tables have more than 100.000.00 registers). Last two months we have had problems with CPU utilization. Debugging the locks (on pg_locks) we notice that sometimes simple UPDATE (by primary key) operation takes out AC