Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Uc8GW-0006VV-Lq for pgsql-bugs@arkaria.postgresql.org; Tue, 14 May 2013 05:59:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Uc8GV-0004ba-NR for pgsql-bugs@arkaria.postgresql.org; Tue, 14 May 2013 05:59:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Uc8GT-0004bS-TJ for pgsql-bugs@postgresql.org; Tue, 14 May 2013 05:59:09 +0000 Received: from szxga01-in.huawei.com ([119.145.14.64]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Uc8GQ-0007L4-O9 for pgsql-bugs@postgresql.org; Tue, 14 May 2013 05:59:09 +0000 Received: from 172.24.2.119 (EHLO szxeml209-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id BCC30129; Tue, 14 May 2013 13:58:54 +0800 (CST) Received: from SZXEML420-HUB.china.huawei.com (10.82.67.159) by szxeml209-edg.china.huawei.com (172.24.2.184) with Microsoft SMTP Server (TLS) id 14.1.323.7; Tue, 14 May 2013 13:58:52 +0800 Received: from blrprnc09ns (10.18.96.98) by szxeml420-hub.china.huawei.com (10.82.67.159) with Microsoft SMTP Server id 14.1.323.7; Tue, 14 May 2013 13:58:49 +0800 From: Amit Kapila To: "'Chaya Gilburt'" , References: <000001ce4f2b$3823a050$a86ae0f0$@nybc.com.br> In-Reply-To: <000001ce4f2b$3823a050$a86ae0f0$@nybc.com.br> Subject: Re: Odd Behavior After Multiple Deletes Date: Tue, 14 May 2013 11:28:47 +0530 Message-ID: <004901ce5068$1a7020e0$4f5062a0$@kapila@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac5PJwd/a33ibo+nSIKhsjSfU5d3zwBQCx2A Content-Language: en-us x-cr-hashedpuzzle: F5sI Ggah G7A6 HMHS Hwlt H3eJ IqXr KK8Y Kf38 LIZV L/m+ Mi9N O6Ug Pkc7 SszZ VYRK; 2; YwBoAGEAeQBhAEAAbgB5AGIAYwAuAGMAbwBtAC4AYgByADsAcABnAHMAcQBsAC0AYgB1AGcAcwBAAHAAbwBzAHQAZwByAGUAcwBxAGwALgBvAHIAZwA=; Sosha1_v1; 7; {A939EEAE-796D-45CC-807E-F8A887EBFA7A}; YQBtAGkAdAAuAGsAYQBwAGkAbABhAEAAaAB1AGEAdwBlAGkALgBjAG8AbQA=; Tue, 14 May 2013 05:58:42 GMT; UgBFADoAIABbAEIAVQBHAFMAXQAgAE8AZABkACAAQgBlAGgAYQB2AGkAbwByACAAQQBmAHQAZQByACAATQB1AGwAdABpAHAAbABlACAARABlAGwAZQB0AGUAcwA= x-cr-puzzleid: {A939EEAE-796D-45CC-807E-F8A887EBFA7A} X-Originating-IP: [10.18.96.98] X-CFilter-Loop: Reflected X-Pg-Spam-Score: 0.4 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Sunday, May 12, 2013 9:40 PM Chaya Gilburt wrote: > Dear Sirs, > We are observing an odd phenomena with PostgresSQL, which is no doubt due to our using the database improperly. =A0That database in question is PostgresSQL Version 8.7.1 and runs on a machine installed=20 > with Server 2003. The DELETE commands were being issued both from a Windows XP using PostgresSQL Version 9.1 and at times, from the server itself. > 1. We have a table that receives a load of data daily from an older system. Every night, we delete some of the rows on the table using a DELETE command from PgAdminIII, perform a VACUUM Full on that=20 > table, and then reload the data using a batch file that contains a series of INSERTS. We run the batch file from the command line prompt. The table seems fine afterwards, and the data is correct. We=20 > then we turn off the system for the night. > 2. =A0First thing next morning, we look at the data and verify that it is the same as it was the night before. Suddenly, as the day goes by, the older, deleted data appears to =93bleed=94 back into the=20 > table, creating duplicate rows. Users are entering new data to that table during the day, as well as looking at the data we loaded the night before, but none of the duplicate rows are coming from user > input, only the system itself. What are we doing wrong? The system itself cannot insert rows into your tables. I could think of below 2 reasons for seeing extra rows: 1. Delete has not happened appropriately 2. There are triggers defined on tables which could insert the extra rows you are seeing. Is the problem you described happen more than once? Could you form testcase which can show such behavior? With Regards, Amit Kapila. --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs