Skip site navigation (1) Skip section navigation (2)

duplicates rejected by index reports PGSQL_FATAL_ERROR

From: tj <tj(at)getlostspammer(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: duplicates rejected by index reports PGSQL_FATAL_ERROR
Date: 2003-10-30 04:25:39
Message-ID: 7p0ob.75320$ZH4.55826@twister.socal.rr.com (view raw or flat)
Thread:
Lists: pgsql-general
v7.2.2

When an insert fails because its in violation of an index (duplicate), I get 
a return code 7 (PGSQL_FATAL_ERROR) in my php 4.2.3 interface.

Its not really a fatal error, is it?  Shouldn't it be reported as a 
NONFATAL_ERROR ?

I have a "dumb" synchronizing task, that attempts to import a daily 
cumulative batch of records, relying on a specific table index to reject 
the records that were successfully imported from previous runs.  The "index 
rejection" method takes only 25 seconds for my batch of 30,000 records, 
while the "select to find if non-existing then perform the insert" takes 25 
minutes.  Is there a better way?

-- 
TJ

Responses

pgsql-general by date

Next:From: Razvan SurdulescuDate: 2003-10-30 04:41:04
Subject: INSERT performance
Previous:From: Rick GiggerDate: 2003-10-30 03:36:24
Subject: Transaction Performance Question

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group