Re: Copy/delete issue - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Copy/delete issue
Date
Msg-id 200812211028.48373.aklaver@comcast.net
Whole thread Raw
In response to Re: Copy/delete issue  (Herouth Maoz <herouth@unicell.co.il>)
Responses Re: Copy/delete issue
List pgsql-general
On Sunday 21 December 2008 1:49:18 am Herouth Maoz wrote:
> Adrian Klaver wrote:
> > <Snip>
> >
> > Are you sure the problem is not in "$datefield" = "*" . That the script
> > that formats the data file is not correctly adding "*" to the right file.
> > Seems almost like sometimes the second CMD is being run against the table
> > that the first CMD should be run on. In other words it is not doing a
> > complete delete , but a date based one, and you then import duplicate
> > records.
>
> Thanks for your reply. The file containing the tables list is static -
> it doesn't change from one run to the next (unless I edit it personally).
>
> Herouth

Well something is not static :) You mentioned this happens only with one
table. Have you tried running your procedure against that table only? Just
because a DELETE did not error does not mean it succeeded in the way you
wanted. You might want to throw a count() in the mix to see if you are really
clearing out the table the way you want to. Also is the actual data file
static from one run to the next? Would also help to see the schema for the
table involved and maybe a sample of the data, if that is possible.

--
Adrian Klaver
aklaver@comcast.net

pgsql-general by date:

Previous
From: "Dennis Brakhane"
Date:
Subject: Re: Copy/delete issue
Next
From: Charles Duffy
Date:
Subject: Tracking down log segment corruption