Query regarding deadlock

From: Yogesh Sharma <Yogesh1(dot)Sharma(at)nectechnologies(dot)in>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Query regarding deadlock
Date: 2016-11-25 01:44:51
Message-ID: 8F86F8F397DDD345B25EA2EF3E2164829ECC85D7@EXCH-MB02-U1.nectechnologies.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear All,

Thanks in advance.
I found below deadlock in postgresql logs.
I cannot change calling of REINDEX and insert query sequence because it is execute automatically through some cron script.

ERROR: deadlock detected
DETAIL: Process 2234 waits for AccessShareLock on relation 16459 of database 16385; blocked by process 4111.
Process 4111 waits for ShareLock on relation 16502 of database 16385; blocked by process 2234.
Process 2234: INSERT INTO table1 ( id , unique_id )VALUES( '1', '4')
Process 4111: REINDEX TABLE table1

Could you please provide any solution to resolve this deadlock.

Regards,
Yogesh

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2016-11-25 01:55:20 Re: Query regarding deadlock
Previous Message rob stone 2016-11-25 01:34:46 Re: query locks up when run concurrently