From cbe027289a838bcd5820c9d970de7b8d544b4467 Mon Sep 17 00:00:00 2001 From: amit Date: Thu, 3 Dec 2015 13:32:03 +0900 Subject: [PATCH] Consider schemaname too when doing LOCK TABLE in repack_drop(). This was an oversight in a previous commit to fix the deadlock reported in Github issue #55. --- lib/repack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/repack.c b/lib/repack.c index 51dde27..ede7ebc 100644 --- a/lib/repack.c +++ b/lib/repack.c @@ -968,8 +968,8 @@ repack_drop(PG_FUNCTION_ARGS) */ execute_with_format( SPI_OK_UTILITY, - "LOCK TABLE %s IN ACCESS EXCLUSIVE MODE", - relname); + "LOCK TABLE %s.%s IN ACCESS EXCLUSIVE MODE", + nspname, relname); /* drop log table: must be done before dropping the pk type, * since the log table is dependent on the pk type. (That's