Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VrVGt-00015P-Fd for pgsql-bugs@arkaria.postgresql.org; Fri, 13 Dec 2013 16:07:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VrVGs-0001s8-Pk for pgsql-bugs@arkaria.postgresql.org; Fri, 13 Dec 2013 16:07:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VrSZA-0007ah-Ky for pgsql-bugs@postgresql.org; Fri, 13 Dec 2013 13:14:04 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VrSZ4-0003Uf-69 for pgsql-bugs@postgresql.org; Fri, 13 Dec 2013 13:14:04 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by mahout.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VrSZ2-0002MS-PF for pgsql-bugs@postgresql.org; Fri, 13 Dec 2013 13:13:57 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.80) (envelope-from ) id 1VrSYx-00034j-5J for pgsql-bugs@postgresql.org; Fri, 13 Dec 2013 13:13:51 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: BUG #8681: column 'n_tup_del' of pg_stat_user_tables doesn't change in case of truncate To: pgsql-bugs@postgresql.org From: anitchakkarwar@gmail.com Message-Id: Date: Fri, 13 Dec 2013 13:13:51 +0000 X-Pg-Spam-Score: -1.0 (-) 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 The following bug has been logged on the website: Bug reference: 8681 Logged by: Anit chakkarwar Email address: anitchakkarwar@gmail.com PostgreSQL version: 9.3.1 Operating system: Linux Description: I came across one issue while truncating table in Postgres9.3, please find below steps: First Scenario: 1. Create table and insert some rows. 2. Now delete two rows. 3. If I delete rows 'n_tup_del' column in pg_stat_user_tables is set 2. 4. Do vacuum now i.e vacuum table 5. 'n_tup_del' column in pg_stat_user_tables is still showing 2 records. Second Scenario: 1. Create table and insert some rows. 2. Now truncate table. 3. n_tup_del column in pg_stat_user_tables is 0. If I do truncate then n_tup_del value is 0 but all the rows are deleted from table. Is this something expected behaviour ? -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs