mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
pgindent run on all C files. Java run to follow. initdb/regression
tests pass.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.61 2001/10/21 03:25:35 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.62 2001/10/25 05:49:51 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Globals used all over the place should be declared here and not
|
||||
@@ -57,7 +57,8 @@ Relation reldesc; /* current relation descriptor */
|
||||
|
||||
char OutputFileName[MAXPGPATH];
|
||||
|
||||
char pg_pathname[MAXPGPATH]; /* full path to postgres executable */
|
||||
char pg_pathname[MAXPGPATH]; /* full path to postgres
|
||||
* executable */
|
||||
|
||||
BackendId MyBackendId;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.80 2001/10/19 18:19:41 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.81 2001/10/25 05:49:51 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -256,7 +256,6 @@ next_token(FILE *fp, char *buf, const int bufsz)
|
||||
|
||||
if (c != '\n')
|
||||
{
|
||||
|
||||
/*
|
||||
* build a token in buf of next characters up to EOF, eol, or
|
||||
* blank.
|
||||
@@ -317,8 +316,8 @@ SetCharSet()
|
||||
|
||||
if (p && *p != '\0')
|
||||
{
|
||||
map_file = malloc(strlen(DataDir) + strlen(p) + 2);
|
||||
if (! map_file)
|
||||
map_file = malloc(strlen(DataDir) + strlen(p) + 2);
|
||||
if (!map_file)
|
||||
elog(FATAL, "out of memory");
|
||||
sprintf(map_file, "%s/%s", DataDir, p);
|
||||
file = AllocateFile(map_file, PG_BINARY_R);
|
||||
@@ -381,7 +380,6 @@ convertstr(unsigned char *buff, int len, int dest)
|
||||
}
|
||||
return ch;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -487,7 +485,8 @@ InitializeSessionUserIdStandalone(void)
|
||||
/*
|
||||
* Change session auth ID while running
|
||||
*/
|
||||
void SetSessionAuthorization(const char * username)
|
||||
void
|
||||
SetSessionAuthorization(const char *username)
|
||||
{
|
||||
int32 userid;
|
||||
|
||||
@@ -579,13 +578,12 @@ CreateLockFile(const char *filename, bool amPostmaster,
|
||||
pid_t my_pid = getpid();
|
||||
|
||||
/*
|
||||
* We need a loop here because of race conditions. But don't loop
|
||||
* We need a loop here because of race conditions. But don't loop
|
||||
* forever (for example, a non-writable $PGDATA directory might cause
|
||||
* a failure that won't go away). 100 tries seems like plenty.
|
||||
*/
|
||||
for (ntries = 0; ; ntries++)
|
||||
for (ntries = 0;; ntries++)
|
||||
{
|
||||
|
||||
/*
|
||||
* Try to create the lock file --- O_EXCL makes this atomic.
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.94 2001/10/19 17:03:08 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.95 2001/10/25 05:49:51 momjian Exp $
|
||||
*
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
@@ -221,7 +221,10 @@ InitPostgres(const char *dbname, const char *username)
|
||||
char *fullpath,
|
||||
datpath[MAXPGPATH];
|
||||
|
||||
/* Formerly we validated DataDir here, but now that's done earlier. */
|
||||
/*
|
||||
* Formerly we validated DataDir here, but now that's done
|
||||
* earlier.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Find oid and path of the database we're about to open. Since
|
||||
@@ -257,7 +260,7 @@ InitPostgres(const char *dbname, const char *username)
|
||||
*/
|
||||
|
||||
/*
|
||||
* Set up my per-backend PROC struct in shared memory. (We need to
|
||||
* Set up my per-backend PROC struct in shared memory. (We need to
|
||||
* know MyDatabaseId before we can do this, since it's entered into
|
||||
* the PROC struct.)
|
||||
*/
|
||||
@@ -284,8 +287,8 @@ InitPostgres(const char *dbname, const char *username)
|
||||
AmiTransactionOverride(bootstrap);
|
||||
|
||||
/*
|
||||
* Initialize the relation descriptor cache.
|
||||
* The pre-allocated reldescs are created here.
|
||||
* Initialize the relation descriptor cache. The pre-allocated
|
||||
* reldescs are created here.
|
||||
*/
|
||||
RelationCacheInitialize();
|
||||
|
||||
@@ -320,9 +323,8 @@ InitPostgres(const char *dbname, const char *username)
|
||||
RelationCacheInitializePhase2();
|
||||
|
||||
/*
|
||||
* Figure out our postgres user id. In standalone mode we use a
|
||||
* fixed id, otherwise we figure it out from the authenticated
|
||||
* user name.
|
||||
* Figure out our postgres user id. In standalone mode we use a fixed
|
||||
* id, otherwise we figure it out from the authenticated user name.
|
||||
*/
|
||||
if (bootstrap)
|
||||
InitializeSessionUserIdStandalone();
|
||||
@@ -388,7 +390,6 @@ InitPostgres(const char *dbname, const char *username)
|
||||
static void
|
||||
ShutdownPostgres(void)
|
||||
{
|
||||
|
||||
/*
|
||||
* These operations are really just a minimal subset of
|
||||
* AbortTransaction(). We don't want to do any inessential cleanup,
|
||||
@@ -408,7 +409,7 @@ ShutdownPostgres(void)
|
||||
* has to happen before bufmgr shutdown, so having smgr register a
|
||||
* callback for it wouldn't work.
|
||||
*/
|
||||
smgrDoPendingDeletes(false);/* delete as though aborting xact */
|
||||
smgrDoPendingDeletes(false); /* delete as though aborting xact */
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user