mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
pgindent run for 9.4
This includes removing tabs after periods in C comments, which was applied to back branches, so this change should not effect backpatching.
This commit is contained in:
@@ -59,7 +59,7 @@ static List *lock_files = NIL;
|
||||
*
|
||||
* NOTE: "ignoring system indexes" means we do not use the system indexes
|
||||
* for lookups (either in hardwired catalog accesses or in planner-generated
|
||||
* plans). We do, however, still update the indexes when a catalog
|
||||
* plans). We do, however, still update the indexes when a catalog
|
||||
* modification is made.
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
@@ -230,7 +230,7 @@ SetSessionUserId(Oid userid, bool is_superuser)
|
||||
* Currently there are two valid bits in SecurityRestrictionContext:
|
||||
*
|
||||
* SECURITY_LOCAL_USERID_CHANGE indicates that we are inside an operation
|
||||
* that is temporarily changing CurrentUserId via these functions. This is
|
||||
* that is temporarily changing CurrentUserId via these functions. This is
|
||||
* needed to indicate that the actual value of CurrentUserId is not in sync
|
||||
* with guc.c's internal state, so SET ROLE has to be disallowed.
|
||||
*
|
||||
@@ -251,7 +251,7 @@ SetSessionUserId(Oid userid, bool is_superuser)
|
||||
* ever throw any kind of error. This is because they are used by
|
||||
* StartTransaction and AbortTransaction to save/restore the settings,
|
||||
* and during the first transaction within a backend, the value to be saved
|
||||
* and perhaps restored is indeed invalid. We have to be able to get
|
||||
* and perhaps restored is indeed invalid. We have to be able to get
|
||||
* through AbortTransaction without asserting in case InitPostgres fails.
|
||||
*/
|
||||
void
|
||||
@@ -291,7 +291,7 @@ InSecurityRestrictedOperation(void)
|
||||
/*
|
||||
* These are obsolete versions of Get/SetUserIdAndSecContext that are
|
||||
* only provided for bug-compatibility with some rather dubious code in
|
||||
* pljava. We allow the userid to be set, but only when not inside a
|
||||
* pljava. We allow the userid to be set, but only when not inside a
|
||||
* security restriction context.
|
||||
*/
|
||||
void
|
||||
@@ -394,7 +394,7 @@ InitializeSessionUserId(const char *rolename)
|
||||
* Check connection limit for this role.
|
||||
*
|
||||
* There is a race condition here --- we create our PGPROC before
|
||||
* checking for other PGPROCs. If two backends did this at about the
|
||||
* checking for other PGPROCs. If two backends did this at about the
|
||||
* same time, they might both think they were over the limit, while
|
||||
* ideally one should succeed and one fail. Getting that to work
|
||||
* exactly seems more trouble than it is worth, however; instead we
|
||||
@@ -493,7 +493,7 @@ GetCurrentRoleId(void)
|
||||
* Change Role ID while running (SET ROLE)
|
||||
*
|
||||
* If roleid is InvalidOid, we are doing SET ROLE NONE: revert to the
|
||||
* session user authorization. In this case the is_superuser argument
|
||||
* session user authorization. In this case the is_superuser argument
|
||||
* is ignored.
|
||||
*
|
||||
* When roleid is not InvalidOid, the caller must have checked whether
|
||||
@@ -561,7 +561,7 @@ GetUserNameFromId(Oid roleid)
|
||||
* ($DATADIR/postmaster.pid) and Unix-socket-file lockfiles ($SOCKFILE.lock).
|
||||
* Both kinds of files contain the same info initially, although we can add
|
||||
* more information to a data-directory lockfile after it's created, using
|
||||
* AddToDataDirLockFile(). See miscadmin.h for documentation of the contents
|
||||
* AddToDataDirLockFile(). See miscadmin.h for documentation of the contents
|
||||
* of these lockfiles.
|
||||
*
|
||||
* On successful lockfile creation, a proc_exit callback to remove the
|
||||
@@ -650,7 +650,7 @@ CreateLockFile(const char *filename, bool amPostmaster,
|
||||
my_gp_pid = 0;
|
||||
|
||||
/*
|
||||
* We need a loop here because of race conditions. But don't loop forever
|
||||
* 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.
|
||||
*/
|
||||
@@ -659,7 +659,7 @@ CreateLockFile(const char *filename, bool amPostmaster,
|
||||
/*
|
||||
* Try to create the lock file --- O_EXCL makes this atomic.
|
||||
*
|
||||
* Think not to make the file protection weaker than 0600. See
|
||||
* Think not to make the file protection weaker than 0600. See
|
||||
* comments below.
|
||||
*/
|
||||
fd = open(filename, O_RDWR | O_CREAT | O_EXCL, 0600);
|
||||
@@ -727,7 +727,7 @@ CreateLockFile(const char *filename, bool amPostmaster,
|
||||
* implies that the existing process has a different userid than we
|
||||
* do, which means it cannot be a competing postmaster. A postmaster
|
||||
* cannot successfully attach to a data directory owned by a userid
|
||||
* other than its own. (This is now checked directly in
|
||||
* other than its own. (This is now checked directly in
|
||||
* checkDataDir(), but has been true for a long time because of the
|
||||
* restriction that the data directory isn't group- or
|
||||
* world-accessible.) Also, since we create the lockfiles mode 600,
|
||||
@@ -765,9 +765,9 @@ CreateLockFile(const char *filename, bool amPostmaster,
|
||||
}
|
||||
|
||||
/*
|
||||
* No, the creating process did not exist. However, it could be that
|
||||
* No, the creating process did not exist. However, it could be that
|
||||
* the postmaster crashed (or more likely was kill -9'd by a clueless
|
||||
* admin) but has left orphan backends behind. Check for this by
|
||||
* admin) but has left orphan backends behind. Check for this by
|
||||
* looking to see if there is an associated shmem segment that is
|
||||
* still in use.
|
||||
*
|
||||
@@ -808,7 +808,7 @@ CreateLockFile(const char *filename, bool amPostmaster,
|
||||
|
||||
/*
|
||||
* Looks like nobody's home. Unlink the file and try again to create
|
||||
* it. Need a loop because of possible race condition against other
|
||||
* it. Need a loop because of possible race condition against other
|
||||
* would-be creators.
|
||||
*/
|
||||
if (unlink(filename) < 0)
|
||||
@@ -822,8 +822,8 @@ CreateLockFile(const char *filename, bool amPostmaster,
|
||||
}
|
||||
|
||||
/*
|
||||
* Successfully created the file, now fill it. See comment in miscadmin.h
|
||||
* about the contents. Note that we write the same first five lines into
|
||||
* Successfully created the file, now fill it. See comment in miscadmin.h
|
||||
* about the contents. Note that we write the same first five lines into
|
||||
* both datadir and socket lockfiles; although more stuff may get added to
|
||||
* the datadir lockfile later.
|
||||
*/
|
||||
|
||||
@@ -80,7 +80,7 @@ static void process_settings(Oid databaseid, Oid roleid);
|
||||
* GetDatabaseTuple -- fetch the pg_database row for a database
|
||||
*
|
||||
* This is used during backend startup when we don't yet have any access to
|
||||
* system catalogs in general. In the worst case, we can seqscan pg_database
|
||||
* system catalogs in general. In the worst case, we can seqscan pg_database
|
||||
* using nothing but the hard-wired descriptor that relcache.c creates for
|
||||
* pg_database. In more typical cases, relcache.c was able to load
|
||||
* descriptors for both pg_database and its indexes from the shared relcache
|
||||
@@ -104,7 +104,7 @@ GetDatabaseTuple(const char *dbname)
|
||||
CStringGetDatum(dbname));
|
||||
|
||||
/*
|
||||
* Open pg_database and fetch a tuple. Force heap scan if we haven't yet
|
||||
* Open pg_database and fetch a tuple. Force heap scan if we haven't yet
|
||||
* built the critical shared relcache entries (i.e., we're starting up
|
||||
* without a shared relcache cache file).
|
||||
*/
|
||||
@@ -147,7 +147,7 @@ GetDatabaseTupleByOid(Oid dboid)
|
||||
ObjectIdGetDatum(dboid));
|
||||
|
||||
/*
|
||||
* Open pg_database and fetch a tuple. Force heap scan if we haven't yet
|
||||
* Open pg_database and fetch a tuple. Force heap scan if we haven't yet
|
||||
* built the critical shared relcache entries (i.e., we're starting up
|
||||
* without a shared relcache cache file).
|
||||
*/
|
||||
@@ -186,7 +186,7 @@ PerformAuthentication(Port *port)
|
||||
* In EXEC_BACKEND case, we didn't inherit the contents of pg_hba.conf
|
||||
* etcetera from the postmaster, and have to load them ourselves.
|
||||
*
|
||||
* FIXME: [fork/exec] Ugh. Is there a way around this overhead?
|
||||
* FIXME: [fork/exec] Ugh. Is there a way around this overhead?
|
||||
*/
|
||||
#ifdef EXEC_BACKEND
|
||||
if (!load_hba())
|
||||
@@ -310,7 +310,7 @@ CheckMyDatabase(const char *name, bool am_superuser)
|
||||
name)));
|
||||
|
||||
/*
|
||||
* Check privilege to connect to the database. (The am_superuser test
|
||||
* Check privilege to connect to the database. (The am_superuser test
|
||||
* is redundant, but since we have the flag, might as well check it
|
||||
* and save a few cycles.)
|
||||
*/
|
||||
@@ -326,7 +326,7 @@ CheckMyDatabase(const char *name, bool am_superuser)
|
||||
* Check connection limit for this database.
|
||||
*
|
||||
* There is a race condition here --- we create our PGPROC before
|
||||
* checking for other PGPROCs. If two backends did this at about the
|
||||
* checking for other PGPROCs. If two backends did this at about the
|
||||
* same time, they might both think they were over the limit, while
|
||||
* ideally one should succeed and one fail. Getting that to work
|
||||
* exactly seems more trouble than it is worth, however; instead we
|
||||
@@ -454,7 +454,7 @@ InitializeMaxBackends(void)
|
||||
|
||||
/* the extra unit accounts for the autovacuum launcher */
|
||||
MaxBackends = MaxConnections + autovacuum_max_workers + 1 +
|
||||
+ max_worker_processes;
|
||||
+max_worker_processes;
|
||||
|
||||
/* internal error because the values were all checked previously */
|
||||
if (MaxBackends > MAX_BACKENDS)
|
||||
@@ -491,7 +491,7 @@ BaseInit(void)
|
||||
* Initialize POSTGRES.
|
||||
*
|
||||
* The database can be specified by name, using the in_dbname parameter, or by
|
||||
* OID, using the dboid parameter. In the latter case, the actual database
|
||||
* OID, using the dboid parameter. In the latter case, the actual database
|
||||
* name can be returned to the caller in out_dbname. If out_dbname isn't
|
||||
* NULL, it must point to a buffer of size NAMEDATALEN.
|
||||
*
|
||||
@@ -912,7 +912,7 @@ InitPostgres(const char *in_dbname, Oid dboid, const char *username,
|
||||
|
||||
/*
|
||||
* Now process any command-line switches and any additional GUC variable
|
||||
* settings passed in the startup packet. We couldn't do this before
|
||||
* settings passed in the startup packet. We couldn't do this before
|
||||
* because we didn't know if client is a superuser.
|
||||
*/
|
||||
if (MyProcPort != NULL)
|
||||
|
||||
Reference in New Issue
Block a user