Re: clearing of the transactions shown in pg_locks - Mailing list pgsql-general

From Jim Nasby
Subject Re: clearing of the transactions shown in pg_locks
Date
Msg-id 55415F72.7030604@BlueTreble.com
Whole thread Raw
In response to clearing of the transactions shown in pg_locks  (Mitu Verma <mitu.verma@ericsson.com>)
List pgsql-general
On 4/29/15 12:32 AM, Mitu Verma wrote:
> This script first does the indexing then it deletes the entries from the
> table. Now issue is that this script is taking lot of time and has
> acquired some locks also. Nor sure if it is happening due to indexing or
> what.

Mixing DDL with bulk DML operations is not a recipe for good
concurrency. For that matter, running DDL on a recurring basis isn't
good either.

BTW, you might want to look at using PgQ to do the queuing; it has
different methods of maintaining it's queues so you don't run into these
sort of problems.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com


pgsql-general by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Pg_bulkload and speed
Next
From: Jim Nasby
Date:
Subject: Re: newsfeed type query