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

Commit995773b

Browse files
committed
Pass canAcceptConnections to exec'ed backend, for Jan.
1 parent5ecd4e3 commit995773b

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.325 2003/05/08 20:43:07 momjian Exp $
40+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.326 2003/05/09 15:57:24 momjian Exp $
4141
*
4242
* NOTES
4343
*
@@ -2431,7 +2431,7 @@ BackendFinalize(Port *port)
24312431
#ifdefEXEC_BACKEND
24322432
Assert(UsedShmemSegID!=0&&UsedShmemSegAddr!=NULL);
24332433
/* database name at the end because it might contain commas */
2434-
snprintf(pbuf,NAMEDATALEN+256,"%d,%d,%p,%s",port->sock,
2434+
snprintf(pbuf,NAMEDATALEN+256,"%d,%d,%d,%p,%s",port->sock,canAcceptConnections(),
24352435
UsedShmemSegID,UsedShmemSegAddr,port->database_name);
24362436
av[ac++]=pbuf;
24372437
#else

‎src/backend/tcop/postgres.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.340 2003/05/08 18:16:36 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.341 2003/05/09 15:57:24 momjian Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -2142,16 +2142,15 @@ PostgresMain(int argc, char *argv[], const char *username)
21422142
{
21432143
#ifdefEXEC_BACKEND
21442144
char*p;
2145-
2146-
sscanf(optarg,"%d,%d,%p,",&MyProcPort->sock,
2145+
inti;
2146+
intPMcanAcceptConnections;/* will eventually be global or static, when fork */
2147+
2148+
sscanf(optarg,"%d,%d,%d,%p,",&MyProcPort->sock,&PMcanAcceptConnections,
21472149
&UsedShmemSegID,&UsedShmemSegAddr);
21482150
/* Grab dbname as last param */
2149-
p=strchr(optarg,',');
2150-
if (p)
2151-
p=strchr(p+1,',');
2152-
if (p)
2151+
for (i=0,p=optarg-1;i<4&&p;i++)
21532152
p=strchr(p+1,',');
2154-
if (p)
2153+
if (i==4&&p)
21552154
dbname=strdup(p+1);
21562155
#else
21572156
dbname=strdup(optarg);
@@ -2512,7 +2511,7 @@ PostgresMain(int argc, char *argv[], const char *username)
25122511
if (!IsUnderPostmaster)
25132512
{
25142513
puts("\nPOSTGRES backend interactive interface ");
2515-
puts("$Revision: 1.340 $ $Date: 2003/05/08 18:16:36 $\n");
2514+
puts("$Revision: 1.341 $ $Date: 2003/05/09 15:57:24 $\n");
25162515
}
25172516

25182517
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp