Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
58118db3
Commit
58118db3
authored
Mar 17, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new postgres -O option to allow system table structure changes.
parent
62a7754e
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
57 additions
and
71 deletions
+57
-71
src/backend/bootstrap/bootstrap.c
src/backend/bootstrap/bootstrap.c
+3
-3
src/backend/catalog/aclchk.c
src/backend/catalog/aclchk.c
+3
-2
src/backend/catalog/heap.c
src/backend/catalog/heap.c
+4
-3
src/backend/commands/command.c
src/backend/commands/command.c
+2
-2
src/backend/commands/rename.c
src/backend/commands/rename.c
+4
-4
src/backend/commands/trigger.c
src/backend/commands/trigger.c
+1
-1
src/backend/parser/gram.c
src/backend/parser/gram.c
+1
-1
src/backend/storage/file/fd.c
src/backend/storage/file/fd.c
+2
-4
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+13
-4
src/backend/tcop/utility.c
src/backend/tcop/utility.c
+4
-4
src/backend/utils/init/globals.c
src/backend/utils/init/globals.c
+3
-2
src/bin/initdb/initdb.sh
src/bin/initdb/initdb.sh
+7
-38
src/include/miscadmin.h
src/include/miscadmin.h
+3
-2
src/man/postgres.1
src/man/postgres.1
+7
-1
No files found.
src/backend/bootstrap/bootstrap.c
View file @
58118db3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.5
5 1999/02/13 23:14:52
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.5
6 1999/03/17 22:52:45
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -182,7 +182,7 @@ static char *relname; /* current relation name */
...
@@ -182,7 +182,7 @@ static char *relname; /* current relation name */
Form_pg_attribute
attrtypes
[
MAXATTR
];
/* points to attribute info */
Form_pg_attribute
attrtypes
[
MAXATTR
];
/* points to attribute info */
static
char
*
values
[
MAXATTR
];
/* cooresponding attribute values */
static
char
*
values
[
MAXATTR
];
/* cooresponding attribute values */
int
numattr
;
/* number of attributes for cur. rel */
int
numattr
;
/* number of attributes for cur. rel */
extern
int
fsyncOff
;
/* do not fsync the database */
extern
bool
disableFsync
;
/* do not fsync the database */
/* The test for HAVE_SIGSETJMP fails on Linux 2.0.x because the test
/* The test for HAVE_SIGSETJMP fails on Linux 2.0.x because the test
* explicitly disallows sigsetjmp being a #define, which is how it
* explicitly disallows sigsetjmp being a #define, which is how it
...
@@ -335,7 +335,7 @@ BootstrapMain(int argc, char *argv[])
...
@@ -335,7 +335,7 @@ BootstrapMain(int argc, char *argv[])
Noversion
=
true
;
Noversion
=
true
;
break
;
break
;
case
'F'
:
case
'F'
:
fsyncOff
=
true
;
disableFsync
=
true
;
break
;
break
;
case
'O'
:
case
'O'
:
override
=
true
;
override
=
true
;
...
...
src/backend/catalog/aclchk.c
View file @
58118db3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.
19 1999/02/13 23:14:54
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.
20 1999/03/17 22:52:47
momjian Exp $
*
*
* NOTES
* NOTES
* See acl.h.
* See acl.h.
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include "utils/memutils.h"
#include "utils/memutils.h"
#include "utils/syscache.h"
#include "utils/syscache.h"
#include "utils/tqual.h"
#include "utils/tqual.h"
#include "miscadmin.h"
static
int32
aclcheck
(
char
*
relname
,
Acl
*
acl
,
AclId
id
,
AclIdType
idtype
,
AclMode
mode
);
static
int32
aclcheck
(
char
*
relname
,
Acl
*
acl
,
AclId
id
,
AclIdType
idtype
,
AclMode
mode
);
...
@@ -398,7 +399,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
...
@@ -398,7 +399,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
* themselves from themselves.)
* themselves from themselves.)
*/
*/
if
(((
mode
&
ACL_WR
)
||
(
mode
&
ACL_AP
))
&&
if
(((
mode
&
ACL_WR
)
||
(
mode
&
ACL_AP
))
&&
IsSystemRelationName
(
relname
)
&&
!
allowSystemTableMods
&&
IsSystemRelationName
(
relname
)
&&
!
((
Form_pg_shadow
)
GETSTRUCT
(
tuple
))
->
usecatupd
)
!
((
Form_pg_shadow
)
GETSTRUCT
(
tuple
))
->
usecatupd
)
{
{
elog
(
DEBUG
,
"pg_aclcheck: catalog update to
\"
%s
\"
: permission denied"
,
elog
(
DEBUG
,
"pg_aclcheck: catalog update to
\"
%s
\"
: permission denied"
,
...
...
src/backend/catalog/heap.c
View file @
58118db3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.7
5 1999/02/23 07:54:03 thomas
Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.7
6 1999/03/17 22:52:48 momjian
Exp $
*
*
*
*
* INTERFACE ROUTINES
* INTERFACE ROUTINES
...
@@ -195,7 +195,7 @@ heap_create(char *relname,
...
@@ -195,7 +195,7 @@ heap_create(char *relname,
*/
*/
AssertArg
(
natts
>
0
);
AssertArg
(
natts
>
0
);
if
(
relname
&&
IsSystemRelationName
(
relname
)
&&
IsNormalProcessingMode
())
if
(
relname
&&
!
allowSystemTableMods
&&
IsSystemRelationName
(
relname
)
&&
IsNormalProcessingMode
())
{
{
elog
(
ERROR
,
"Illegal class name '%s'"
elog
(
ERROR
,
"Illegal class name '%s'"
"
\n\t
The 'pg_' name prefix is reserved for system catalogs"
,
"
\n\t
The 'pg_' name prefix is reserved for system catalogs"
,
...
@@ -1260,7 +1260,8 @@ heap_destroy_with_catalog(char *relname)
...
@@ -1260,7 +1260,8 @@ heap_destroy_with_catalog(char *relname)
* ----------------
* ----------------
*/
*/
/* allow temp of pg_class? Guess so. */
/* allow temp of pg_class? Guess so. */
if
(
!
istemp
&&
IsSystemRelationName
(
RelationGetRelationName
(
rel
)
->
data
))
if
(
!
istemp
&&
!
allowSystemTableMods
&&
IsSystemRelationName
(
RelationGetRelationName
(
rel
)
->
data
))
elog
(
ERROR
,
"System relation '%s' cannot be destroyed"
,
elog
(
ERROR
,
"System relation '%s' cannot be destroyed"
,
&
rel
->
rd_rel
->
relname
);
&
rel
->
rd_rel
->
relname
);
...
...
src/backend/commands/command.c
View file @
58118db3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.
39 1999/02/24 17:28:57
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.
40 1999/03/17 22:52:51
momjian Exp $
*
*
* NOTES
* NOTES
* The PortalExecutorHeapMemory crap needs to be eliminated
* The PortalExecutorHeapMemory crap needs to be eliminated
...
@@ -308,7 +308,7 @@ PerformAddAttribute(char *relationName,
...
@@ -308,7 +308,7 @@ PerformAddAttribute(char *relationName,
*
*
* normally, only the owner of a class can change its schema.
* normally, only the owner of a class can change its schema.
*/
*/
if
(
IsSystemRelationName
(
relationName
))
if
(
!
allowSystemTableMods
&&
IsSystemRelationName
(
relationName
))
elog
(
ERROR
,
"PerformAddAttribute: class
\"
%s
\"
is a system catalog"
,
elog
(
ERROR
,
"PerformAddAttribute: class
\"
%s
\"
is a system catalog"
,
relationName
);
relationName
);
#ifndef NO_SECURITY
#ifndef NO_SECURITY
...
...
src/backend/commands/rename.c
View file @
58118db3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.2
1 1999/02/13 23:15:09
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.2
2 1999/03/17 22:52:52
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -81,7 +81,7 @@ renameatt(char *relname,
...
@@ -81,7 +81,7 @@ renameatt(char *relname,
*
*
* normally, only the owner of a class can change its schema.
* normally, only the owner of a class can change its schema.
*/
*/
if
(
IsSystemRelationName
(
relname
))
if
(
!
allowSystemTableMods
&&
IsSystemRelationName
(
relname
))
elog
(
ERROR
,
"renameatt: class
\"
%s
\"
is a system catalog"
,
elog
(
ERROR
,
"renameatt: class
\"
%s
\"
is a system catalog"
,
relname
);
relname
);
#ifndef NO_SECURITY
#ifndef NO_SECURITY
...
@@ -207,11 +207,11 @@ renamerel(char *oldrelname, char *newrelname)
...
@@ -207,11 +207,11 @@ renamerel(char *oldrelname, char *newrelname)
newpath
[
MAXPGPATH
];
newpath
[
MAXPGPATH
];
Relation
irelations
[
Num_pg_class_indices
];
Relation
irelations
[
Num_pg_class_indices
];
if
(
IsSystemRelationName
(
oldrelname
))
if
(
!
allowSystemTableMods
&&
IsSystemRelationName
(
oldrelname
))
elog
(
ERROR
,
"renamerel: system relation
\"
%s
\"
not renamed"
,
elog
(
ERROR
,
"renamerel: system relation
\"
%s
\"
not renamed"
,
oldrelname
);
oldrelname
);
if
(
IsSystemRelationName
(
newrelname
))
if
(
!
allowSystemTableMods
&&
IsSystemRelationName
(
newrelname
))
elog
(
ERROR
,
"renamerel: Illegal class name:
\"
%s
\"
-- pg_ is reserved for system catalogs"
,
elog
(
ERROR
,
"renamerel: Illegal class name:
\"
%s
\"
-- pg_ is reserved for system catalogs"
,
newrelname
);
newrelname
);
...
...
src/backend/commands/trigger.c
View file @
58118db3
...
@@ -66,7 +66,7 @@ CreateTrigger(CreateTrigStmt *stmt)
...
@@ -66,7 +66,7 @@ CreateTrigger(CreateTrigStmt *stmt)
int
found
=
0
;
int
found
=
0
;
int
i
;
int
i
;
if
(
IsSystemRelationName
(
stmt
->
relname
))
if
(
!
allowSystemTableMods
&&
IsSystemRelationName
(
stmt
->
relname
))
elog
(
ERROR
,
"CreateTrigger: can't create trigger for system relation %s"
,
stmt
->
relname
);
elog
(
ERROR
,
"CreateTrigger: can't create trigger for system relation %s"
,
stmt
->
relname
);
#ifndef NO_SECURITY
#ifndef NO_SECURITY
...
...
src/backend/parser/gram.c
View file @
58118db3
...
@@ -242,7 +242,7 @@
...
@@ -242,7 +242,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.8
1 1999/03/17 21:02:50
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.8
2 1999/03/17 22:52:57
momjian Exp $
*
*
* HISTORY
* HISTORY
* AUTHOR DATE MAJOR EVENT
* AUTHOR DATE MAJOR EVENT
...
...
src/backend/storage/file/fd.c
View file @
58118db3
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Id: fd.c,v 1.3
7 1999/02/13 23:18:05
momjian Exp $
* $Id: fd.c,v 1.3
8 1999/03/17 22:53:06
momjian Exp $
*
*
* NOTES:
* NOTES:
*
*
...
@@ -168,9 +168,7 @@ static long pg_nofile(void);
...
@@ -168,9 +168,7 @@ static long pg_nofile(void);
int
int
pg_fsync
(
int
fd
)
pg_fsync
(
int
fd
)
{
{
extern
int
fsyncOff
;
return
disableFsync
?
0
:
fsync
(
fd
);
return
fsyncOff
?
0
:
fsync
(
fd
);
}
}
#define fsync pg_fsync
#define fsync pg_fsync
...
...
src/backend/tcop/postgres.c
View file @
58118db3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.10
4 1999/02/21 03:49:27 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.10
5 1999/03/17 22:53:18 momjian
Exp $
*
*
* NOTES
* NOTES
* this is the "main" module of the postgres backend and
* this is the "main" module of the postgres backend and
...
@@ -917,6 +917,7 @@ usage(char *progname)
...
@@ -917,6 +917,7 @@ usage(char *progname)
#ifdef LOCK_MGR_DEBUG
#ifdef LOCK_MGR_DEBUG
fprintf
(
stderr
,
"
\t
-K
\t\t
set locking debug level [0|1|2]
\n
"
);
fprintf
(
stderr
,
"
\t
-K
\t\t
set locking debug level [0|1|2]
\n
"
);
#endif
#endif
fprintf
(
stderr
,
"
\t
-O
\t\t
allow system table structure changes
\n
"
);
fprintf
(
stderr
,
"
\t
-P port
\t\t
set port file descriptor
\n
"
);
fprintf
(
stderr
,
"
\t
-P port
\t\t
set port file descriptor
\n
"
);
fprintf
(
stderr
,
"
\t
-Q
\t\t
suppress informational messages
\n
"
);
fprintf
(
stderr
,
"
\t
-Q
\t\t
suppress informational messages
\n
"
);
fprintf
(
stderr
,
"
\t
-S buffers
\t
set amount of sort memory available
\n
"
);
fprintf
(
stderr
,
"
\t
-S buffers
\t
set amount of sort memory available
\n
"
);
...
@@ -1017,7 +1018,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
...
@@ -1017,7 +1018,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
optind
=
1
;
/* reset after postmaster usage */
optind
=
1
;
/* reset after postmaster usage */
while
((
flag
=
getopt
(
argc
,
argv
,
while
((
flag
=
getopt
(
argc
,
argv
,
"A:B:CD:d:Eef:iK:Lm:MNo:P:pQS:st:v:x:FW:"
))
"A:B:CD:d:Eef:iK:Lm:MN
O
o:P:pQS:st:v:x:FW:"
))
!=
EOF
)
!=
EOF
)
switch
(
flag
)
switch
(
flag
)
{
{
...
@@ -1096,7 +1097,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
...
@@ -1096,7 +1097,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
* turn off fsync
* turn off fsync
* --------------------
* --------------------
*/
*/
fsyncOff
=
1
;
disableFsync
=
true
;
break
;
break
;
case
'f'
:
case
'f'
:
...
@@ -1168,6 +1169,14 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
...
@@ -1168,6 +1169,14 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
StrNCpy
(
OutputFileName
,
optarg
,
MAXPGPATH
);
StrNCpy
(
OutputFileName
,
optarg
,
MAXPGPATH
);
break
;
break
;
case
'O'
:
/* --------------------
* allow system table structure modifications
* --------------------
*/
allowSystemTableMods
=
true
;
break
;
case
'p'
:
/* started by postmaster */
case
'p'
:
/* started by postmaster */
/* ----------------
/* ----------------
* p - special flag passed if backend was forked
* p - special flag passed if backend was forked
...
@@ -1522,7 +1531,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
...
@@ -1522,7 +1531,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
if
(
!
IsUnderPostmaster
)
if
(
!
IsUnderPostmaster
)
{
{
puts
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"$Revision: 1.10
4 $ $Date: 1999/02/21 03:49:27
$
\n
"
);
puts
(
"$Revision: 1.10
5 $ $Date: 1999/03/17 22:53:18
$
\n
"
);
}
}
/* ----------------
/* ----------------
...
...
src/backend/tcop/utility.c
View file @
58118db3
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.5
8 1999/03/16 03:24:17
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.5
9 1999/03/17 22:53:19
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -187,7 +187,7 @@ ProcessUtility(Node *parsetree,
...
@@ -187,7 +187,7 @@ ProcessUtility(Node *parsetree,
foreach
(
arg
,
args
)
foreach
(
arg
,
args
)
{
{
relname
=
strVal
(
lfirst
(
arg
));
relname
=
strVal
(
lfirst
(
arg
));
if
(
IsSystemRelationName
(
relname
))
if
(
!
allowSystemTableMods
&&
IsSystemRelationName
(
relname
))
elog
(
ERROR
,
"class
\"
%s
\"
is a system catalog"
,
elog
(
ERROR
,
"class
\"
%s
\"
is a system catalog"
,
relname
);
relname
);
rel
=
heap_openr
(
relname
);
rel
=
heap_openr
(
relname
);
...
@@ -268,7 +268,7 @@ ProcessUtility(Node *parsetree,
...
@@ -268,7 +268,7 @@ ProcessUtility(Node *parsetree,
CHECK_IF_ABORTED
();
CHECK_IF_ABORTED
();
relname
=
stmt
->
relname
;
relname
=
stmt
->
relname
;
if
(
IsSystemRelationName
(
relname
))
if
(
!
allowSystemTableMods
&&
IsSystemRelationName
(
relname
))
elog
(
ERROR
,
"class
\"
%s
\"
is a system catalog"
,
elog
(
ERROR
,
"class
\"
%s
\"
is a system catalog"
,
relname
);
relname
);
#ifndef NO_SECURITY
#ifndef NO_SECURITY
...
@@ -457,7 +457,7 @@ ProcessUtility(Node *parsetree,
...
@@ -457,7 +457,7 @@ ProcessUtility(Node *parsetree,
{
{
case
INDEX
:
case
INDEX
:
relname
=
stmt
->
name
;
relname
=
stmt
->
name
;
if
(
IsSystemRelationName
(
relname
))
if
(
!
allowSystemTableMods
&&
IsSystemRelationName
(
relname
))
elog
(
ERROR
,
"class
\"
%s
\"
is a system catalog index"
,
elog
(
ERROR
,
"class
\"
%s
\"
is a system catalog index"
,
relname
);
relname
);
#ifndef NO_SECURITY
#ifndef NO_SECURITY
...
...
src/backend/utils/init/globals.c
View file @
58118db3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.2
7 1999/02/13 23:20:00
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.2
8 1999/03/17 22:53:19
momjian Exp $
*
*
* NOTES
* NOTES
* Globals used all over the place should be declared here and not
* Globals used all over the place should be declared here and not
...
@@ -82,7 +82,8 @@ char DateFormat[20] = "%d-%m-%Y"; /* mjl: sizes! or better
...
@@ -82,7 +82,8 @@ char DateFormat[20] = "%d-%m-%Y"; /* mjl: sizes! or better
* malloc? XXX */
* malloc? XXX */
char
FloatFormat
[
20
]
=
"%f"
;
char
FloatFormat
[
20
]
=
"%f"
;
int
fsyncOff
=
0
;
bool
disableFsync
=
false
;
bool
allowSystemTableMods
=
false
;
int
SortMem
=
512
;
int
SortMem
=
512
;
char
*
IndexedCatalogNames
[]
=
{
char
*
IndexedCatalogNames
[]
=
{
...
...
src/bin/initdb/initdb.sh
View file @
58118db3
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#
#
#
#
# IDENTIFICATION
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.5
7 1999/01/28 15:28:40 wieck
Exp $
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.5
8 1999/03/17 22:53:25 momjian
Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -398,7 +398,7 @@ fi
...
@@ -398,7 +398,7 @@ fi
echo
echo
PGSQL_OPT
=
"-o /dev/null -F -Q -D
$PGDATA
"
PGSQL_OPT
=
"-o /dev/null -
O -
F -Q -D
$PGDATA
"
# If the COPY is first, the VACUUM generates an error, so we vacuum first
# If the COPY is first, the VACUUM generates an error, so we vacuum first
echo
"Vacuuming template1"
echo
"Vacuuming template1"
...
@@ -408,7 +408,7 @@ echo "COPY pg_shadow TO '$PGDATA/pg_pwd' USING DELIMITERS '\\t'" | \
...
@@ -408,7 +408,7 @@ echo "COPY pg_shadow TO '$PGDATA/pg_pwd' USING DELIMITERS '\\t'" | \
postgres
$PGSQL_OPT
template1
>
/dev/null
postgres
$PGSQL_OPT
template1
>
/dev/null
echo
"Creating public pg_user view"
echo
"Creating public pg_user view"
echo
"CREATE TABLE
x
pg_user (
\
echo
"CREATE TABLE pg_user (
\
usename name,
\
usename name,
\
usesysid int4,
\
usesysid int4,
\
usecreatedb bool,
\
usecreatedb bool,
\
...
@@ -418,12 +418,6 @@ echo "CREATE TABLE xpg_user ( \
...
@@ -418,12 +418,6 @@ echo "CREATE TABLE xpg_user ( \
passwd text,
\
passwd text,
\
valuntil abstime);"
| postgres
$PGSQL_OPT
template1
>
/dev/null
valuntil abstime);"
| postgres
$PGSQL_OPT
template1
>
/dev/null
#move it into pg_user
echo
"UPDATE pg_class SET relname = 'pg_user' WHERE relname = 'xpg_user';"
|
\
postgres
$PGSQL_OPT
template1
>
/dev/null
echo
"UPDATE pg_type SET typname = 'pg_user' WHERE typname = 'xpg_user';"
|
\
postgres
$PGSQL_OPT
template1
>
/dev/null
mv
$PGDATA
/base/template1/xpg_user
$PGDATA
/base/template1/pg_user
echo
"CREATE RULE
\"
_RETpg_user
\"
AS ON SELECT TO pg_user DO INSTEAD
\
echo
"CREATE RULE
\"
_RETpg_user
\"
AS ON SELECT TO pg_user DO INSTEAD
\
SELECT usename, usesysid, usecreatedb, usetrace,
\
SELECT usename, usesysid, usecreatedb, usetrace,
\
...
@@ -434,16 +428,10 @@ echo "REVOKE ALL on pg_shadow FROM public" | \
...
@@ -434,16 +428,10 @@ echo "REVOKE ALL on pg_shadow FROM public" | \
postgres
$PGSQL_OPT
template1
>
/dev/null
postgres
$PGSQL_OPT
template1
>
/dev/null
echo
"Creating view pg_rules"
echo
"Creating view pg_rules"
echo
"CREATE TABLE
x
pg_rules (
\
echo
"CREATE TABLE pg_rules (
\
tablename name,
\
tablename name,
\
rulename name,
\
rulename name,
\
definition text);"
| postgres
$PGSQL_OPT
template1
>
/dev/null
definition text);"
| postgres
$PGSQL_OPT
template1
>
/dev/null
#move it into pg_rules
echo
"UPDATE pg_class SET relname = 'pg_rules' WHERE relname = 'xpg_rules';"
|
\
postgres
$PGSQL_OPT
template1
>
/dev/null
echo
"UPDATE pg_type SET typname = 'pg_rules' WHERE typname = 'xpg_rules';"
|
\
postgres
$PGSQL_OPT
template1
>
/dev/null
mv
$PGDATA
/base/template1/xpg_rules
$PGDATA
/base/template1/pg_rules
echo
"CREATE RULE
\"
_RETpg_rules
\"
AS ON SELECT TO pg_rules DO INSTEAD
\
echo
"CREATE RULE
\"
_RETpg_rules
\"
AS ON SELECT TO pg_rules DO INSTEAD
\
SELECT C.relname AS tablename,
\
SELECT C.relname AS tablename,
\
...
@@ -455,16 +443,10 @@ echo "CREATE RULE \"_RETpg_rules\" AS ON SELECT TO pg_rules DO INSTEAD \
...
@@ -455,16 +443,10 @@ echo "CREATE RULE \"_RETpg_rules\" AS ON SELECT TO pg_rules DO INSTEAD \
postgres
$PGSQL_OPT
template1
>
/dev/null
postgres
$PGSQL_OPT
template1
>
/dev/null
echo
"Creating view pg_views"
echo
"Creating view pg_views"
echo
"CREATE TABLE
x
pg_views (
\
echo
"CREATE TABLE pg_views (
\
viewname name,
\
viewname name,
\
viewowner name,
\
viewowner name,
\
definition text);"
| postgres
$PGSQL_OPT
template1
>
/dev/null
definition text);"
| postgres
$PGSQL_OPT
template1
>
/dev/null
#move it into pg_views
echo
"UPDATE pg_class SET relname = 'pg_views' WHERE relname = 'xpg_views';"
|
\
postgres
$PGSQL_OPT
template1
>
/dev/null
echo
"UPDATE pg_type SET typname = 'pg_views' WHERE typname = 'xpg_views';"
|
\
postgres
$PGSQL_OPT
template1
>
/dev/null
mv
$PGDATA
/base/template1/xpg_views
$PGDATA
/base/template1/pg_views
echo
"CREATE RULE
\"
_RETpg_views
\"
AS ON SELECT TO pg_views DO INSTEAD
\
echo
"CREATE RULE
\"
_RETpg_views
\"
AS ON SELECT TO pg_views DO INSTEAD
\
SELECT C.relname AS viewname,
\
SELECT C.relname AS viewname,
\
...
@@ -476,18 +458,12 @@ echo "CREATE RULE \"_RETpg_views\" AS ON SELECT TO pg_views DO INSTEAD \
...
@@ -476,18 +458,12 @@ echo "CREATE RULE \"_RETpg_views\" AS ON SELECT TO pg_views DO INSTEAD \
postgres
$PGSQL_OPT
template1
>
/dev/null
postgres
$PGSQL_OPT
template1
>
/dev/null
echo
"Creating view pg_tables"
echo
"Creating view pg_tables"
echo
"CREATE TABLE
x
pg_tables (
\
echo
"CREATE TABLE pg_tables (
\
tablename name,
\
tablename name,
\
tableowner name,
\
tableowner name,
\
hasindexes bool,
\
hasindexes bool,
\
hasrules bool,
\
hasrules bool,
\
hastriggers bool);"
| postgres
$PGSQL_OPT
template1
>
/dev/null
hastriggers bool);"
| postgres
$PGSQL_OPT
template1
>
/dev/null
#move it into pg_tables
echo
"UPDATE pg_class SET relname = 'pg_tables' WHERE relname = 'xpg_tables';"
|
\
postgres
$PGSQL_OPT
template1
>
/dev/null
echo
"UPDATE pg_type SET typname = 'pg_tables' WHERE typname = 'xpg_tables';"
|
\
postgres
$PGSQL_OPT
template1
>
/dev/null
mv
$PGDATA
/base/template1/xpg_tables
$PGDATA
/base/template1/pg_tables
echo
"CREATE RULE
\"
_RETpg_tables
\"
AS ON SELECT TO pg_tables DO INSTEAD
\
echo
"CREATE RULE
\"
_RETpg_tables
\"
AS ON SELECT TO pg_tables DO INSTEAD
\
SELECT C.relname AS tablename,
\
SELECT C.relname AS tablename,
\
...
@@ -501,16 +477,10 @@ echo "CREATE RULE \"_RETpg_tables\" AS ON SELECT TO pg_tables DO INSTEAD \
...
@@ -501,16 +477,10 @@ echo "CREATE RULE \"_RETpg_tables\" AS ON SELECT TO pg_tables DO INSTEAD \
postgres
$PGSQL_OPT
template1
>
/dev/null
postgres
$PGSQL_OPT
template1
>
/dev/null
echo
"Creating view pg_indexes"
echo
"Creating view pg_indexes"
echo
"CREATE TABLE
x
pg_indexes (
\
echo
"CREATE TABLE pg_indexes (
\
tablename name,
\
tablename name,
\
indexname name,
\
indexname name,
\
indexdef text);"
| postgres
$PGSQL_OPT
template1
>
/dev/null
indexdef text);"
| postgres
$PGSQL_OPT
template1
>
/dev/null
#move it into pg_indexes
echo
"UPDATE pg_class SET relname = 'pg_indexes' WHERE relname = 'xpg_indexes';"
|
\
postgres
$PGSQL_OPT
template1
>
/dev/null
echo
"UPDATE pg_type SET typname = 'pg_indexes' WHERE typname = 'xpg_indexes';"
|
\
postgres
$PGSQL_OPT
template1
>
/dev/null
mv
$PGDATA
/base/template1/xpg_indexes
$PGDATA
/base/template1/pg_indexes
echo
"CREATE RULE
\"
_RETpg_indexes
\"
AS ON SELECT TO pg_indexes DO INSTEAD
\
echo
"CREATE RULE
\"
_RETpg_indexes
\"
AS ON SELECT TO pg_indexes DO INSTEAD
\
SELECT C.relname AS tablename,
\
SELECT C.relname AS tablename,
\
...
@@ -528,4 +498,3 @@ echo "copy pg_description from '$GLOBAL_DESCR'" | \
...
@@ -528,4 +498,3 @@ echo "copy pg_description from '$GLOBAL_DESCR'" | \
postgres
$PGSQL_OPT
template1
>
/dev/null
postgres
$PGSQL_OPT
template1
>
/dev/null
echo
"vacuum analyze"
|
\
echo
"vacuum analyze"
|
\
postgres
$PGSQL_OPT
template1
>
/dev/null
postgres
$PGSQL_OPT
template1
>
/dev/null
src/include/miscadmin.h
View file @
58118db3
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: miscadmin.h,v 1.3
5 1999/02/13 23:20:46
momjian Exp $
* $Id: miscadmin.h,v 1.3
6 1999/03/17 22:53:30
momjian Exp $
*
*
* NOTES
* NOTES
* some of the information in this file will be moved to
* some of the information in this file will be moved to
...
@@ -94,7 +94,8 @@ extern char CTZName[];
...
@@ -94,7 +94,8 @@ extern char CTZName[];
extern
char
FloatFormat
[];
extern
char
FloatFormat
[];
extern
char
DateFormat
[];
extern
char
DateFormat
[];
extern
int
fsyncOff
;
extern
bool
disableFsync
;
extern
bool
allowSystemTableMods
;
extern
int
SortMem
;
extern
int
SortMem
;
extern
Oid
LastOidProcessed
;
/* for query rewrite */
extern
Oid
LastOidProcessed
;
/* for query rewrite */
...
...
src/man/postgres.1
View file @
58118db3
.\" This is -*-nroff-*-
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/postgres.1,v 1.1
3 1999/02/18 05:26:34
momjian Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/postgres.1,v 1.1
4 1999/03/17 22:53:31
momjian Exp $
.TH POSTGRESQL UNIX 12/08/96 PostgreSQL PostgreSQL
.TH POSTGRESQL UNIX 12/08/96 PostgreSQL PostgreSQL
.SH NAME
.SH NAME
postgres - the Postgres backend server
postgres - the Postgres backend server
...
@@ -22,6 +22,9 @@ data_directory]
...
@@ -22,6 +22,9 @@ data_directory]
.BR "-F"
.BR "-F"
]
]
[\c
[\c
.BR "-O"
]
[\c
.BR "-P"
.BR "-P"
filedes]
filedes]
[\c
[\c
...
@@ -99,6 +102,9 @@ Disable automatic fsync() call after each transaction.
...
@@ -99,6 +102,9 @@ Disable automatic fsync() call after each transaction.
This option improves performance, but an operating system crash
This option improves performance, but an operating system crash
while a transaction is in progress will probably cause data loss.
while a transaction is in progress will probably cause data loss.
.TP
.TP
.BR "-O"
Override restrictions, so system table structures can be modified(pg_*).
.TP
.BR "-P" " filedes"
.BR "-P" " filedes"
.IR "filedes"
.IR "filedes"
specifies the file descriptor that corresponds to the socket (port) on
specifies the file descriptor that corresponds to the socket (port) on
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment