pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martin Neumann <mne@darwin.oche.de>
To: pgsql-sql@postgreSQL.org
Subject: How to resume an aborted transaction
Date: Wed, 1 Sep 1999 17:20:21 +0200 (CEST)
Message-ID: <m11MCBW-000DLPC@darwin.oche.de> (raw)

Every day I get a plain-vanilla ASCII-file containg space-separated
values. I parse the file with a script and make each row in the file an
INSERT-statement. Sometimes one of these many statements contains
rubbish becaused the line in the file I was processing contained
rubbish.

If I did a separate transaction for every INSERT-statement this doesn't
hurt because only one statement (the broken one) doesn't get processed.

But I have to do about 100.000 INSERTs everyday and this is _slow_ if I
let PostgreSQL process each statement individually.

So my idea was to use a chained transaction. This works perfectly as
long as all INSERT-statement are okay. But if one is broken, PostgreSQL
doesn't process the other statements, too.

My goal is to use chained transaction and to don't have to bother
about broken INSERT-statements. Is that possible or to do I have to
check the statements manually (by the script) before executing?

-- 
`Unser Kopf ist rund, damit das Denken die Richtung wechseln kann.'
  ~ Francis Picabia




Message-ID: <m11MCBW-000DLPC@darwin.oche.de>
Permalink:  ../m11MCBW-000DLPC@darwin.oche.de/
Also on:    postgresql.org/message-id/m11MCBW-000DLPC@darwin.oche.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: mne@darwin.oche.de
  Subject: Re: How to resume an aborted transaction
  In-Reply-To: <m11MCBW-000DLPC@darwin.oche.de>
  References: <m11MCBW-000DLPC@darwin.oche.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox