Re: Give me some suggestion

From: Alban Hertroys <alban(at)magproductions(dot)nl>
To: usanee tuangrathooradee <tuangrathooradee(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Give me some suggestion
Date: 2006-04-18 14:37:48
Message-ID: 4444F9BC.5060109@magproductions.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

usanee tuangrathooradee wrote:
> Hello,
> I 'm a new postgresql user and now I have some problem about it.
> I'm not sure this problem is a bug of postgresql or not.
> My problem is I have to read a text file ,processing and keep it into
> database.
> Each text file is about 50,000 records, the process can be insert,update
> and delete.
> I had random check and found that in the process of updating some can not
> be updating.

What do you mean? Did you receive an error (if so, which one), or does
nothing seem to happen to that specific record?
In the first case the error should shed some light on your problem, in
the second case - maybe you are updating a different record than you
think, or the data didn't really change.

What are the queries you perform that "don't work"? What do your tables
look like? Without that it's near impossible to say what's wrong.

> It's happen with some text file ,but some are not.

If it happens consistently with the same data files, then the cause of
your troubles is probably in the data somewhere. May be a bad assumption
that causes your queries to do something different than you expect, or
maybe the text files are in an encoding that your database doesn't
support, or maybe something entirely different.

> I really don't know what is the cause of problem but it's not about
> bussiness logic because
> sometimes it's updating correctly.
> I had investigate the log file of my program but there is nothing (I
> wrote the log file to show if
> it had an Exception or SQLException,so i'm quite sure that my sql
> statement is correct.)

Then it can still be your business logic at fault.

> I used postgresql 7.4.6 , Platform is SUN Solaris9 , my program is java
> web-application (on tomcat4.1).

You really should be using a more recent version. IIRC there are some
possible data corruption bugs in that version. It's a couple of years
old too. Updating to a recent 7.4 version shouldn't cause any problems,
but be sure to have a dump available (made with the tools of the new
version).

Regards,

--
Alban Hertroys
alban(at)magproductions(dot)nl

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede

// Integrate Your World //

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim Buttafuoco 2006-04-18 14:44:35 Re: Query to check existence of stored procedure?
Previous Message Tom Lane 2006-04-18 14:20:04 Re: i have a core file on running gdb the op