From: vadim@mvscusa.com
To: pgsql-bugs@postgresql.org
Subject: BUG #8553: CRITICAL - delete from doesn't delete rows, select returns them anyway
Date: Fri, 25 Oct 2013 02:37:14 +0000
Message-ID: <E1VZXH0-0007SO-CG@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 8553
Logged by: Vadim Yevsyukov
Email address: vadim@mvscusa.com
PostgreSQL version: 9.3.1
Operating system: CentOS 6.4
Description:
After upgrading to PostgreSQL 9.3.1.
Schema:
create sequence JobSeq start 1;
create table Job
(
jobId int not null default nextval('JobSeq'),
name varchar(50) not null,
className varchar(50) not null,
timeoutSeconds int null,
enabled boolean not null,
nextRun timestamp null,
running boolean not null,
dayMask int null,
timeOfDaySeconds int null,
dayOfMonth int null,
nextRunForce boolean not null,
constraint PK_Job primary key (jobId)
);
I noticed a weird exceptions in my billing system that's processing
payments. After some research, I found that my internal job scheduler's
table in PostgreSQL has two records for 'Payment Processor' job (jobId = 2),
which should not be possible, since jobId is the primary key.
I tried to delete records: delete from Job where jobId = 2; But instead of
reporting '2 records affected', PostgreSQL has reported 'one record
affected'. I ran 'select from Job where jobId = 2' and it returned no rows,
however when I ran query without 'where' clause 'select * from Job' - it did
returned two records with jobId = 2.
Query 'select count(*) from Job where jobId = 2' also reporting 0, despite
two records returned in 'select * from Job'.
Does look like a CRITICAL bug to me. Let me know please if additional
information is needed.
Thank you,
Vadim
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: vadim@mvscusa.com
Subject: Re: BUG #8553: CRITICAL - delete from doesn't delete rows, select returns them anyway
In-Reply-To: <E1VZXH0-0007SO-CG@wrigleys.postgresql.org>
References: <E1VZXH0-0007SO-CG@wrigleys.postgresql.org>
* 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