Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UFpbT-0002zG-Sj for pgsql-admin@arkaria.postgresql.org; Wed, 13 Mar 2013 17:36:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UFpbS-00078p-TF for pgsql-admin@arkaria.postgresql.org; Wed, 13 Mar 2013 17:36:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UFpbS-00078j-7Y for pgsql-admin@postgresql.org; Wed, 13 Mar 2013 17:36:38 +0000 Received: from mail-vc0-f180.google.com ([209.85.220.180]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UFpbN-0003mH-1l for pgsql-admin@postgresql.org; Wed, 13 Mar 2013 17:36:37 +0000 Received: by mail-vc0-f180.google.com with SMTP id fo13so679272vcb.39 for ; Wed, 13 Mar 2013 10:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=sFw7Y2OTZXPlWy4qgqta04ufngcvt+AyQ+qjNidj7c8=; b=kDDb7E468rTNX+V8/RmpPjBp6z5GFXzwS54neRdSYhmNtQzvaRS00UA1rb/HwmyiW0 9QkYpeAh5XP/zQrSP6KM1ekQ431xO2TgisYON36DF6VBmuM3pBKkmO+U8dF64AVaAIVe rFBsCU3++x70Y/Kx8jL26o9GAjfEEnf8zlZtd8GP4nWc0WQF4KOYH5Yj7nlsV/wBL9xY FgHLQRhFAA8JsfirdLAsX7Aj621ObEGZHGReyn1WI0y18qyNTqTy4LymvEZm2fghYdmh Wf6dqtYIdOnC2mZ1et363hupYuv30Lh7RFXWLuYnDgGQ9YV7m/FAHIlJE+00jrJ4uhCK 76Lg== X-Received: by 10.52.27.138 with SMTP id t10mr5876834vdg.59.1363196191649; Wed, 13 Mar 2013 10:36:31 -0700 (PDT) Received: from [18.58.4.81] (TRANSIT1.MIT.EDU. [18.58.4.81]) by mx.google.com with ESMTPS id h11sm5659859vdj.12.2013.03.13.10.36.29 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Mar 2013 10:36:30 -0700 (PDT) Message-ID: <5140B917.5060405@gmail.com> Date: Wed, 13 Mar 2013 13:36:23 -0400 From: =?ISO-8859-1?Q?=22Gabriel_E=2E_S=E1nchez_Mart=EDnez=22?= User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: tables mysteriously truncated Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org I have run into an annoying issue several times. After successfully populating a table with the COPY command, letting the server run auto-vacuum analyze, and being able to query the table without any issues for several days, the table suddenly appears to be empty. In pgAdmin I see a large estimated number of rows, as it should be, but any SELECT to that table returns no rows, and SELECT COUNT(*) returns 0. If I run an ANALYZE on that table and refresh pgAdmin, the estimated number of rows is reset to 0. It is as if someone had run TRUNCATE on the table, but I cannot find TRUNCATE or DELETE statements on the logs, and the only users with the privileges to do so (my colleague and I) have not executed such statements. The rest of the users can only select and reference. I am running PostgreSQL 9.1.8 on Ubuntu 12.10 x86_64 server. I have a master unlogged table with all the columns, no primary key, and no index. This master_table has no data per se. Then I have several partitions, created as follows: CREATE UNLOGGED TABLE partition_1 () INHERITS (master_table) WITH (OIDS = FALSE); Each partition contains up to 20 million rows, and I have about 30 partitions. I have three such sets of tables on the same database, and the issue has happened multiple times with two of the three sets of tables. Curiously, the one that has never been affected is a bit different: the master table contains a column id bigserial, which is a primary key. Also, this table is logged. Has anyone run into similar issues in the past? Could this be a bug? Thanks in advance. -Gabriel -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin