8000 Remove use of LWLockAssign and RequestAddinLWLocks by carbonin · Pull Request #1 · 2ndQuadrant/postgres · GitHub
[go: up one dir, main page]

Skip to content

Remove use of LWLockAssign and RequestAddinLWLocks #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contrib/pglogical/pglogical_worker.c
4B7E
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
0