Re: canceling a delete

From: Kevin Grittner <kgrittn(at)gmail(dot)com>
To: "Campbell, Lance" <lance(at)illinois(dot)edu>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: canceling a delete
Date: 2016-05-19 18:54:34
Message-ID: CACjxUsO9q2L9OYHvOg8aHKbh95ObPcgR9wmBDBXaVdKZ9=oY1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, May 19, 2016 at 2:44 PM, Campbell, Lance <lance(at)illinois(dot)edu> wrote:
> PostgreSQL 9.5.x

It is always best to show the full version number, just in case one of
the bugs fixed in a minor release could matter for the issue at hand.
(In this case I don't know of any, but there is not much point
checking for sure when I can only guess at what you are running.)

> Delete from some_table;
>
> I realized that I should have had a where clause. So I canceled the delete
> with CTRL-C. PostgreSQL said to canceled the delete.

Again, copy/paste of what you saw would allow a response with higher confidence.

> Did PostgreSQL delete any records?

Not if it processed the Ctrl+C before the command completed normally.
Either all rows in the table should be gone or the DELETE had no
effect.

Note that now would be a horrible time to suffer database corruption.
If, for example, you needed to run pg_resetxlog right now, you might
lose a lot of those rows. Tread carefully.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Campbell, Lance 2016-05-19 19:09:35 Re: canceling a delete
Previous Message Campbell, Lance 2016-05-19 18:44:56 canceling a delete