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

Commit38ff52c

Browse files
committed
Allow port numbers 32k - 64k.
1 parent517da8b commit38ff52c

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

‎doc/TODO

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ PARSER
3030
* Array index references without table name cause problems
3131
* Update table SET table.value = 3 fails
3232
* Creating index of timestamp fails
33+
* SELECT foo UNION SELECT foo is incorrectly simplified to SELECT foo
3334

3435
VIEWS
3536

@@ -207,8 +208,8 @@ MISC
207208
places, like GROUP BY, UNIQUE, index processing, etc.
208209
* improve dynamic memory allocation by introducing tuple-context memory
209210
allocation
210-
*add pooled memory allocation where allocations are freed only as a group
211-
211+
*fix indexscan() so it does leak memory by not requiring caller to free
212+
* fix memory leak in cache code when non-existant table is refer
212213

213214
SOURCE CODE
214215
-----------

‎src/backend/libpq/pqcomm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* Copyright (c) 1994, Regents of the University of California
3030
*
31-
*$Id: pqcomm.c,v 1.72 1999/05/25 16:09:02 momjian Exp $
31+
*$Id: pqcomm.c,v 1.73 1999/07/07 17:17:47 momjian Exp $
3232
*
3333
*-------------------------------------------------------------------------
3434
*/
@@ -181,7 +181,7 @@ StreamDoUnlink()
181181
*/
182182

183183
int
184-
StreamServerPort(char*hostName,shortportName,int*fdP)
184+
StreamServerPort(char*hostName,unsignedshortportName,int*fdP)
185185
{
186186
SockAddrsaddr;
187187
intfd,

‎src/backend/postmaster/postmaster.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.107 1999/07/02 18:09:27 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.108 1999/07/07 17:17:48 momjian Exp $
1414
*
1515
* NOTES
1616
*
@@ -130,7 +130,7 @@ static Dllist *BackendList;
130130
/* list of ports associated with still open, but incomplete connections */
131131
staticDllist*PortList;
132132

133-
staticshortPostPortName=-1;
133+
staticunsignedshortPostPortName=0;
134134
staticshortActiveBackends= FALSE;
135135

136136
/*
@@ -240,7 +240,7 @@ extern intoptind,
240240
*/
241241
staticvoidpmdaemonize(void);
242242
staticPort*ConnCreate(intserverFd);
243-
staticvoidreset_shared(shortport);
243+
staticvoidreset_shared(unsignedshortport);
244244
staticvoidpmdie(SIGNAL_ARGS);
245245
staticvoidreaper(SIGNAL_ARGS);
246246
staticvoiddumpstatus(SIGNAL_ARGS);
@@ -502,7 +502,7 @@ PostmasterMain(int argc, char *argv[])
502502
break;
503503
case'p':
504504
/* Set PGPORT by hand. */
505-
PostPortName= (short)atoi(optarg);
505+
PostPortName= (unsignedshort)atoi(optarg);
506506
break;
507507
case'S':
508508

@@ -534,8 +534,8 @@ PostmasterMain(int argc, char *argv[])
534534
/*
535535
* Select default values for switches where needed
536536
*/
537-
if (PostPortName==-1)
538-
PostPortName=pq_getport();
537+
if (PostPortName==0)
538+
PostPortName=(unsigned short)pq_getport();
539539

540540
/*
541541
* Check for invalid combinations of switches
@@ -1050,7 +1050,7 @@ ConnCreate(int serverFd)
10501050
* reset_shared -- reset shared memory and semaphores
10511051
*/
10521052
staticvoid
1053-
reset_shared(shortport)
1053+
reset_shared(unsignedshortport)
10541054
{
10551055
ipc_key=port*1000+shmem_seq*100;
10561056
CreateSharedMemoryAndSemaphores(ipc_key,MaxBackends);

‎src/include/libpq/libpq.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: libpq.h,v 1.30 1999/05/25 22:42:50 momjian Exp $
9+
* $Id: libpq.h,v 1.31 1999/07/07 17:17:50 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -234,7 +234,7 @@ extern int32 pqtest(struct varlena * vlena);
234234
/*
235235
* prototypes for functions in pqcomm.c
236236
*/
237-
externintStreamServerPort(char*hostName,shortportName,int*fdP);
237+
externintStreamServerPort(char*hostName,unsignedshortportName,int*fdP);
238238
externintStreamConnection(intserver_fd,Port*port);
239239
externvoidStreamClose(intsock);
240240
externvoidpq_init(void);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp