Re: COPY enhancements

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Emmanuel Cecchet <manu(at)asterdata(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: COPY enhancements
Date: 2009-09-10 23:44:16
Message-ID: 4AA98F50.5060604@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Emmanuel Cecchet 2009-09-10 23:54:47 Re: COPY enhancements
Previous Message Emmanuel Cecchet 2009-09-10 23:33:32 Re: COPY enhancements