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:
parent
d1d3d774d3
commit
9ef8f9f80b
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user