mirror of
https://github.com/postgres/postgres.git
synced 2025-11-24 00:23:06 +03:00
Use ProcNumbers instead of direct Latch pointers to address other procs
This is in preparation for replacing Latches with a new abstraction. That's still work in progress, but this seems a little tidier anyway, so let's get this refactoring out of the way already. Discussion: https://www.postgresql.org/message-id/391abe21-413e-4d91-a650-b663af49500c%40iki.fi
This commit is contained in:
@@ -208,10 +208,10 @@ WalWriterMain(char *startup_data, size_t startup_data_len)
|
||||
SetWalWriterSleeping(false);
|
||||
|
||||
/*
|
||||
* Advertise our latch that backends can use to wake us up while we're
|
||||
* sleeping.
|
||||
* Advertise our proc number that backends can use to wake us up while
|
||||
* we're sleeping.
|
||||
*/
|
||||
ProcGlobal->walwriterLatch = &MyProc->procLatch;
|
||||
ProcGlobal->walwriterProc = MyProcNumber;
|
||||
|
||||
/*
|
||||
* Loop forever
|
||||
|
||||
Reference in New Issue
Block a user