Parallel Insert and Delete operation

From: "Yelai, Ramkumar IN BLR STS" <ramkumar(dot)yelai(at)siemens(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Parallel Insert and Delete operation
Date: 2012-10-31 11:40:15
Message-ID: 13D0F6C9B3073A4999E61CAAD61AE7ECC5E73E0BB1@INBLRK77M2MSX.in002.siemens.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,

Please clarify me the following example.

I have 2 tables

Table1 - ( it has one primary key and few columns )
Table2 - ( it has one primary key and few columns. It has one foreign key, which refers table1 primary key ).

I have 2 operations, which are written in pl/pgsql procedure.

Operation1() - Inserts the records to table2 at every hour basis.
Operation2() - Delete the records from Table 1 and Table2 based on the primary key.

What if both operations are running at the time for the same primary key.

what I have to take care to run these two operations perfectly without creating inconsistency in database.

Thanks & Regards,
Ramkumar

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mahmoud Hakeem-Habeeb 2012-10-31 12:01:42 Delay streaming replication using a paramter
Previous Message telenieko 2012-10-31 09:22:36 Re: Average Balance "life"