From 8399de735fdd49075e5a3c79024ad185c40fb433 Mon Sep 17 00:00:00 2001 From: Nick Carboni Date: Tue, 26 Apr 2016 12:13:29 -0400 Subject: [PATCH] Remove use of LWLockAssign and RequestAddinLWLocks They were removed in commit 79a7ff0fe56ac9d782b0734ebb0e7a5299015e58 --- contrib/pglogical/pglogical_worker.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/pglogical/pglogical_worker.c b/contrib/pglogical/pglogical_worker.c index cc3786607e2c9..84bc1f19eb807 100644 --- a/contrib/pglogical/pglogical_worker.c +++ b/contrib/pglogical/pglogical_worker.c @@ -406,7 +406,7 @@ pglogical_worker_shmem_startup(void) if (!found) { - PGLogicalCtx->lock = LWLockAssign(); + PGLogicalCtx->lock = &(GetNamedLWLockTranche("pglogical_workers"))->lock; PGLogicalCtx->supervisor = NULL; PGLogicalCtx->total_workers = max_worker_processes; memset(PGLogicalCtx->workers, 0, @@ -430,7 +430,7 @@ pglogical_worker_shmem_init(void) * tries to allocate or free blocks from this array at once. There won't * be enough contention to make anything fancier worth doing. */ - RequestAddinLWLocks(1); + RequestNamedLWLockTranche("pglogical_workers", 1); /* * Whether this is a first startup or crash recovery, we'll be re-initing