pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Szymon Guz <mabewlun@gmail.com>
To: John Lister <john.lister-ps@kickstone.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Strange deletion problem
Date: Tue, 30 Mar 2010 10:24:07 +0200
Message-ID: <e4edc9361003300124x34ebfdafu797723911bf7ed14@mail.gmail.com> (raw)
In-Reply-To: <D29C98141027402A85C7801C69954C11@squarepi.com>
References: <D29C98141027402A85C7801C69954C11@squarepi.com>

2010/3/30 John Lister <john.lister-ps@kickstone.com>

>  Hi, I have a table which is constantly updated through out the day with
> no problems, I'm running Postgresql 8.3.8 in ubuntu karmic. However, within
> the last week for some reason overnight it is being emptied and I can't work
> out why. I've set log_min_duration_statement to 0 so that postgresql dumps
> out every query made to the db but it hasn't brought anything up. During the
> period between from when I know the table is ok to the next morning when
> it is empty I can see entries in the logs for the expected 200 or so
> deletions, but during this period approx 15k rows are removed. The odd thing
> is that there is nothing else in the logs that references the table (I've
> looked for the obvious deletion and trunctate statements).
>
> The table is modified using JDBC prepared statements so I see 3 entries for
> each of the expected delete statements (parse, bind, execute) and the
> statement is as follows:
>
> delete from product_list where retailer_id=? and product_id=?
>
>
> Therefore I have a few questions:
> - Is there any other statements that could be causing the rows to be
> removed that I've missed
> - Is there anything that could be deleting them without generating a log
> entry for the statement?
> - Is it possible that data corruption of either the index/table is making
> my delete statements removed more rows?
> - Is it a possibly bug?
>
>

Hi,
- maybe there are some other settings for this database (they are not stored
in the file), check the pg_settings table in the database
- maybe you're looking in a wrong log file - sometimes do (they change from
time to time - depending on the configuration)
- ensure that the logging is done to file and to THIS file, because there
are more logging settings than just log_min_duration and sometimes it can be
messed up
- try to restart the database and see if there isn't any other file created
as usually I observe that after deleting current log file, the database
doesn't recreate while logging so the logs are not stored.

regards
Szymon Guz

view thread (6+ messages)  latest in thread

Message-ID: <e4edc9361003300124x34ebfdafu797723911bf7ed14@mail.gmail.com>
Permalink:  ../e4edc9361003300124x34ebfdafu797723911bf7ed14@mail.gmail.com/
Also on:    postgresql.org/message-id/e4edc9361003300124x34ebfdafu797723911bf7ed14@mail.gmail.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: mabewlun@gmail.com, john.lister-ps@kickstone.com
  Subject: Re: Strange deletion problem
  In-Reply-To: <e4edc9361003300124x34ebfdafu797723911bf7ed14@mail.gmail.com>

* 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