X-Original-To: pgsql-sql@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 8C64E925BC0 for ; Thu, 29 May 2003 07:19:47 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 26284-07 for ; Thu, 29 May 2003 07:19:46 -0400 (EDT) Received: from wolff.to (wolff.to [66.93.249.74]) by developer.postgresql.org (Postfix) with SMTP id 87CC7925B42 for ; Thu, 29 May 2003 07:19:45 -0400 (EDT) Received: (qmail 11417 invoked by uid 500); 29 May 2003 11:21:59 -0000 Date: Thu, 29 May 2003 06:21:59 -0500 From: Bruno Wolff III To: Abdul Wahab Dahalan Cc: pgsql-sql@postgresql.org Subject: Re: How to undelete deleted data Message-ID: <20030529112159.GD11002@wolff.to> Mail-Followup-To: Abdul Wahab Dahalan , pgsql-sql@postgresql.org References: <3ED5D4CF.3050701@mimos.my> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3ED5D4CF.3050701@mimos.my> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/547 X-Sequence-Number: 13712 On Thu, May 29, 2003 at 17:37:19 +0800, Abdul Wahab Dahalan wrote: > How can I undelete the deleted data from a table; If you notice before you commit, you issue a rollback. Otherwise you need to recover from backup. If you don't have a backup, then you might be able to do some fancy stuff to see old tuples. If you are going to do this you should shutdown the database and make a copy of what you have. If you haven't done a vacuum since the delete, the old tuples should still be stored in the database.