summaryrefslogtreecommitdiff
path: root/src/bin/initdb/initdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/initdb/initdb.c')
-rw-r--r--src/bin/initdb/initdb.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 83b7f6e24d8..2a51916106b 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -18,7 +18,7 @@
* to produce a new database.
*
* For largely-historical reasons, the template1 database is the one built
- * by the basic bootstrap process. After it is complete, template0 and
+ * by the basic bootstrap process. After it is complete, template0 and
* the default database, postgres, are made just by copying template1.
*
* To create template1, we run the postgres (backend) program in bootstrap
@@ -581,7 +581,7 @@ walkdir(char *path, void (*action) (char *fname, bool isdir))
/*
* It's important to fsync the destination directory itself as individual
* file fsyncs don't guarantee that the directory entry for the file is
- * synced. Recent versions of ext4 have made the window much wider but
+ * synced. Recent versions of ext4 have made the window much wider but
* it's been an issue for ext3 and other filesystems in the past.
*/
(*action) (path, true);
@@ -614,7 +614,7 @@ pre_sync_fname(char *fname, bool isdir)
}
/*
- * Prefer sync_file_range, else use posix_fadvise. We ignore any error
+ * Prefer sync_file_range, else use posix_fadvise. We ignore any error
* here since this operation is only a hint anyway.
*/
#if defined(HAVE_SYNC_FILE_RANGE)
@@ -772,7 +772,7 @@ exit_nicely(void)
static char *
get_id(void)
{
- const char *username;
+ const char *username;
#ifndef WIN32
if (geteuid() == 0) /* 0 is root's uid */
@@ -1057,13 +1057,13 @@ static char *
choose_dsm_implementation(void)
{
#ifdef HAVE_SHM_OPEN
- int ntries = 10;
+ int ntries = 10;
while (ntries > 0)
{
- uint32 handle;
- char name[64];
- int fd;
+ uint32 handle;
+ char name[64];
+ int fd;
handle = random();
snprintf(name, 64, "/PostgreSQL.%u", handle);
@@ -1976,7 +1976,7 @@ setup_collation(void)
*/
if (normalize_locale_name(alias, localebuf))
{
- char *quoted_alias = escape_quotes(alias);
+ char *quoted_alias = escape_quotes(alias);
PG_CMD_PRINTF3("INSERT INTO tmp_pg_collation VALUES (E'%s', E'%s', %d);\n",
quoted_alias, quoted_locale, enc);
@@ -1992,7 +1992,7 @@ setup_collation(void)
* When copying collations to the final location, eliminate aliases that
* conflict with an existing locale name for the same encoding. For
* example, "br_FR.iso88591" is normalized to "br_FR", both for encoding
- * LATIN1. But the unnormalized locale "br_FR" already exists for LATIN1.
+ * LATIN1. But the unnormalized locale "br_FR" already exists for LATIN1.
* Prefer the alias that matches the OS locale name, else the first locale
* name by sort order (arbitrary choice to be deterministic).
*
@@ -2099,7 +2099,7 @@ setup_dictionary(void)
/*
* Set up privileges
*
- * We mark most system catalogs as world-readable. We don't currently have
+ * We mark most system catalogs as world-readable. We don't currently have
* to touch functions, languages, or databases, because their default
* permissions are OK.
*
@@ -2532,7 +2532,7 @@ locale_date_order(const char *locale)
* Is the locale name valid for the locale category?
*
* If successful, and canonname isn't NULL, a malloc'd copy of the locale's
- * canonical name is stored there. This is especially useful for figuring out
+ * canonical name is stored there. This is especially useful for figuring out
* what locale name "" means (ie, the environment value). (Actually,
* it seems that on most implementations that's the only thing it's good for;
* we could wish that setlocale gave back a canonically spelled version of
@@ -2886,6 +2886,7 @@ void
get_restricted_token(void)
{
#ifdef WIN32
+
/*
* Before we execute another program, make sure that we are running with a
* restricted token. If not, re-execute ourselves with one.