Re: COPY enhancements - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: COPY enhancements
Date
Msg-id 4AA98F50.5060604@agliodbs.com
Whole thread Raw
In response to Re: COPY enhancements  (Emmanuel Cecchet <manu@asterdata.com>)
Responses Re: COPY enhancements
List pgsql-hackers
> I am not really sure why you need a natural key.

a) because we shouldn't be building any features which teach people bad
db design, and

b) because I will presumably want to purge records from this table
periodically and doing so without a key is likely to result in purging
the wrong records.

> By default, the partition_key contains the index of the faulty entry and
> label the copy command. This could be your key.

Well, you still haven't explained the partition_key to me, so I'm not
quite clear on that.  Help?

The reason why I'd like to have a session_id or pid or similar is so
that I can link the copy errors to which backend is erroring in the
other system views or in the pg_log.

Imagine a system where you have multiple network clients doing COPYs; if
one of them starts bugging out and all I have is a tablename, filename
and time, I'm not going to be able to figure out which client is causing
the problems.  The reason I mention this case is that I have a client
who has a production application like this right now.

-- 
Josh Berkus
PostgreSQL Experts Inc.
www.pgexperts.com


pgsql-hackers by date:

Previous
From: Emmanuel Cecchet
Date:
Subject: Re: COPY enhancements
Next
From: Emmanuel Cecchet
Date:
Subject: Re: COPY enhancements