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

Commitfd86ae1

Browse files
committed
Cleanup global variables, remove stable memory stuff.
1 parente99e4ba commitfd86ae1

File tree

4 files changed

+16
-27
lines changed

4 files changed

+16
-27
lines changed

‎src/backend/tcop/postgres.c

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.40 1997/08/12 20:15:49 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.41 1997/08/14 16:11:15 momjian Exp $
1111
*
1212
* NOTES
1313
* this is the "main" module of the postgres backend and
@@ -107,10 +107,7 @@ extern int lockDebug;
107107
externintlockingOff;
108108
externintNBuffers;
109109

110-
intfsyncOff=0;
111-
intSortMem=512;
112-
113-
intdontExecute=0;
110+
intdontExecute=0;
114111
staticintShowStats;
115112
staticboolIsEmptyQuery= false;
116113

@@ -782,7 +779,7 @@ static void usage(char* progname)
782779
fprintf(stderr," p: backend started by postmaster\n");
783780
fprintf(stderr," P: set port file descriptor\n");
784781
fprintf(stderr," Q: suppress informational messages\n");
785-
fprintf(stderr," S:assume stable mainmemory\n");
782+
fprintf(stderr," S:set amount of sortmemory available\n");
786783
fprintf(stderr," s: show stats after each query\n");
787784
fprintf(stderr," t: trace component execution times\n");
788785
fprintf(stderr," T: execute all possible plans for each query\n");
@@ -800,7 +797,6 @@ PostgresMain(int argc, char *argv[])
800797
{
801798
intflagC;
802799
intflagQ;
803-
intflagS;
804800
intflagE;
805801
intflagEu;
806802
intflag;
@@ -855,7 +851,7 @@ PostgresMain(int argc, char *argv[])
855851
* parse command line arguments
856852
* ----------------
857853
*/
858-
flagC=flagQ=flagS=flagE=flagEu=ShowStats=0;
854+
flagC=flagQ=flagE=flagEu=ShowStats=0;
859855
ShowParserStats=ShowPlannerStats=ShowExecutorStats=0;
860856
#ifdefLOCK_MGR_DEBUG
861857
lockDebug=0;
@@ -1047,18 +1043,6 @@ PostgresMain(int argc, char *argv[])
10471043
*/
10481044
SortMem=atoi(optarg);
10491045
break;
1050-
1051-
#ifdefNOT_USED
1052-
case'S':
1053-
/* ----------------
1054-
* S - assume stable main memory
1055-
* (don't flush all pages at end transaction)
1056-
* ----------------
1057-
*/
1058-
flagS=1;
1059-
SetTransactionFlushEnabled(false);
1060-
break;
1061-
#endif
10621046

10631047
case's':
10641048
/* ----------------
@@ -1180,7 +1164,6 @@ PostgresMain(int argc, char *argv[])
11801164
puts("\t---debug info---");
11811165
printf("\tQuiet = %c\n",Quiet ?'t' :'f');
11821166
printf("\tNoversion = %c\n",Noversion ?'t' :'f');
1183-
printf("\tstable = %c\n",flagS ?'t' :'f');
11841167
printf("\ttimings = %c\n",ShowStats ?'t' :'f');
11851168
printf("\tdates = %s\n",EuroDates ?"European" :"Normal");
11861169
printf("\tbufsize = %d\n",NBuffers);
@@ -1292,11 +1275,11 @@ PostgresMain(int argc, char *argv[])
12921275
*/
12931276
if (IsUnderPostmaster== false) {
12941277
puts("\nPOSTGRES backend interactive interface");
1295-
puts("$Revision: 1.40 $ $Date: 1997/08/12 20:15:49 $");
1278+
puts("$Revision: 1.41 $ $Date: 1997/08/14 16:11:15 $");
12961279
}
12971280

12981281
/* ----------------
1299-
* if stable main memory is assumed (-S flag is set), it is necessary
1282+
* if stable main memory is assumed (-S(old) flag is set), it is necessary
13001283
* to flush all dirty shared buffers before exit
13011284
* plai 8/7/90
13021285
* ----------------

‎src/backend/utils/init/globals.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.9 1997/03/28 07:18:06 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.10 1997/08/14 16:11:21 momjian Exp $
1111
*
1212
* NOTES
1313
* Globals used all over the place should be declared here and not
@@ -75,6 +75,9 @@ charCTZName[MAXTZLEN+1] = "";
7575
charDateFormat[20]="%d-%m-%Y";/* mjl: sizes! or better malloc? XXX */
7676
charFloatFormat[20]="%f";
7777

78+
intfsyncOff=0;
79+
intSortMem=512;
80+
7881
char*IndexedCatalogNames[]= {
7982
AttributeRelationName,
8083
ProcedureRelationName,

‎src/backend/utils/sort/psort.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.14 1997/08/1405:04:38 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.15 1997/08/1416:11:28 momjian Exp $
1111
*
1212
* NOTES
1313
* Sorts the first relation into the second relation.
@@ -61,11 +61,11 @@
6161
#include"utils/lselect.h"
6262
#include"utils/psort.h"
6363

64+
#include"miscadmin.h"
6465
#include"storage/fd.h"
6566

6667
#defineTEMPDIR"./"
6768

68-
externintSortMem;/* defined as postgres option */
6969
staticlongshortzero=0;/* used to delimit runs */
7070

7171
/*

‎src/include/miscadmin.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
* Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $Id: miscadmin.h,v 1.9 1997/04/27 19:21:06 thomas Exp $
14+
* $Id: miscadmin.h,v 1.10 1997/08/14 16:11:41 momjian Exp $
1515
*
1616
* NOTES
1717
* some of the information in this file will be moved to
@@ -89,6 +89,9 @@ extern char CTZName[];
8989
externcharFloatFormat[];
9090
externcharDateFormat[];
9191

92+
externintfsyncOff;
93+
externintSortMem;
94+
9295
externOidLastOidProcessed;/* for query rewrite */
9396

9497
#defineMAX_PARSE_BUFFER 8192

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp