Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite6721c6

Browse files
committed
Previous patch had no detectable virtue other than being a one-liner.
Try to make the code look self-consistent again, so it doesn't confusefuture developers.
1 parent869af50 commite6721c6

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1956,6 +1956,8 @@ canAcceptConnections(void)
19561956

19571957
/*
19581958
* ConnCreate -- create a local connection data structure
1959+
*
1960+
* Returns NULL on failure, other than out-of-memory which is fatal.
19591961
*/
19601962
staticPort*
19611963
ConnCreate(intserverFd)
@@ -1977,17 +1979,15 @@ ConnCreate(int serverFd)
19771979
ConnFree(port);
19781980
returnNULL;
19791981
}
1980-
else
1981-
{
1982-
/*
1983-
* Precompute password salt values to use for this connection. It's
1984-
* slightly annoying to do this long in advance of knowing whether
1985-
* we'll need 'em or not, but we must do the random() calls before we
1986-
* fork, not after. Else the postmaster's random sequence won't get
1987-
* advanced, and all backends would end up using the same salt...
1988-
*/
1989-
RandomSalt(port->md5Salt);
1990-
}
1982+
1983+
/*
1984+
* Precompute password salt values to use for this connection. It's
1985+
* slightly annoying to do this long in advance of knowing whether
1986+
* we'll need 'em or not, but we must do the random() calls before we
1987+
* fork, not after. Else the postmaster's random sequence won't get
1988+
* advanced, and all backends would end up using the same salt...
1989+
*/
1990+
RandomSalt(port->md5Salt);
19911991

19921992
/*
19931993
* Allocate GSSAPI specific state struct

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp