File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 2828 * Portions Copyright (c) 2010-2010, PostgreSQL Global Development Group
2929 *
3030 * IDENTIFICATION
31- * $PostgreSQL: pgsql/src/backend/replication/walsender.c,v 1.31 2010/09/14 13:35:14 heikki Exp $
31+ * $PostgreSQL: pgsql/src/backend/replication/walsender.c,v 1.32 2010/09/15 06:51:19 heikki Exp $
3232 *
3333 *-------------------------------------------------------------------------
3434 */
@@ -511,15 +511,15 @@ InitWalSnd(void)
511511 else
512512 {
513513 /*
514- * Found a free slot. Take ownership of the latch and initialize
515- * the other fields.
514+ * Found a free slot. Reserve it for us.
516515 */
517- OwnLatch ((Latch * ) & walsnd -> latch );
518516 walsnd -> pid = MyProcPid ;
519517 MemSet (& walsnd -> sentPtr , 0 , sizeof (XLogRecPtr ));
520- /* Set MyWalSnd only after it's fully initialized. */
521- MyWalSnd = (WalSnd * ) walsnd ;
522518 SpinLockRelease (& walsnd -> mutex );
519+ /* don't need the lock anymore */
520+ OwnLatch ((Latch * ) & walsnd -> latch );
521+ MyWalSnd = (WalSnd * ) walsnd ;
522+
523523 break ;
524524 }
525525 }
You can’t perform that action at this time.
0 commit comments