Improve error message more explicitely when time out.

This change distinguishes error message between failed to cancel
query due to time out and abandoning to cancel query due to timeout.
This commit is contained in:
Masahiko Sawada 2017-02-22 06:03:54 +00:00
parent d1d3d774d3
commit 9ef8f9f80b

View File

@ -1081,6 +1081,9 @@ repack_one_table(repack_table *table, const char *orderby)
if (!(lock_exclusive(connection, buffer, table->lock_table, TRUE)))
{
if (no_kill_backend)
elog(INFO, "Skipping repack %s due to timeout", table->target_name);
else
elog(WARNING, "lock_exclusive() failed for %s", table->target_name);
goto cleanup;
}
@ -1230,6 +1233,9 @@ repack_one_table(repack_table *table, const char *orderby)
*/
if (!(kill_ddl(connection, table->target_oid, true)))
{
if (no_kill_backend)
elog(INFO, "Skipping repack %s due to timeout.", table->target_name);
else
elog(WARNING, "kill_ddl() failed.");
goto cleanup;
}
@ -1488,7 +1494,7 @@ kill_ddl(PGconn *conn, Oid relid, bool terminate)
*/
if (no_kill_backend)
{
elog(WARNING, "%d unsafe queries remain but do not cancel them",
elog(WARNING, "%d unsafe queries remain but do not cancel them and skip to repack it",
n_tuples);
ret = false;
}