aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/src/sgml/ref/allfiles.sgml3
-rw-r--r--doc/src/sgml/ref/pg_alterckey.sgml (renamed from doc/src/sgml/ref/pg_alterkey.sgml)0
-rw-r--r--src/bin/pg_alterckey/pg_alterckey.c13
3 files changed, 9 insertions, 7 deletions
diff --git a/doc/src/sgml/ref/allfiles.sgml b/doc/src/sgml/ref/allfiles.sgml
index 0f0064150c4..4e9504e11b6 100644
--- a/doc/src/sgml/ref/allfiles.sgml
+++ b/doc/src/sgml/ref/allfiles.sgml
@@ -189,6 +189,7 @@ Complete list of usable sgml source files in this directory.
<!ENTITY values SYSTEM "values.sgml">
<!-- applications and utilities -->
+<!ENTITY pgalterckey SYSTEM "pg_alterckey.sgml">
<!ENTITY clusterdb SYSTEM "clusterdb.sgml">
<!ENTITY createdb SYSTEM "createdb.sgml">
<!ENTITY createuser SYSTEM "createuser.sgml">
@@ -215,7 +216,7 @@ Complete list of usable sgml source files in this directory.
<!ENTITY pgtestfsync SYSTEM "pgtestfsync.sgml">
<!ENTITY pgtesttiming SYSTEM "pgtesttiming.sgml">
<!ENTITY pgupgrade SYSTEM "pgupgrade.sgml">
-<!ENTITY pgwaldump SYSTEM "pg_waldump.sgml">
+<!ENTITY pgwaldump SYSTEM "pg_waldump.sgml">
<!ENTITY postgres SYSTEM "postgres-ref.sgml">
<!ENTITY postmaster SYSTEM "postmaster.sgml">
<!ENTITY psqlRef SYSTEM "psql-ref.sgml">
diff --git a/doc/src/sgml/ref/pg_alterkey.sgml b/doc/src/sgml/ref/pg_alterckey.sgml
index 0c4b14d00ac..0c4b14d00ac 100644
--- a/doc/src/sgml/ref/pg_alterkey.sgml
+++ b/doc/src/sgml/ref/pg_alterckey.sgml
diff --git a/src/bin/pg_alterckey/pg_alterckey.c b/src/bin/pg_alterckey/pg_alterckey.c
index 78b06131654..6c473e33970 100644
--- a/src/bin/pg_alterckey/pg_alterckey.c
+++ b/src/bin/pg_alterckey/pg_alterckey.c
@@ -343,16 +343,17 @@ create_lockfile(void)
unlink(pid_path);
/* Sleep to reduce the likelihood of concurrent unlink */
- sleep(2);
+ pg_usleep(2000000L); /* 2 seconds */
}
/* Create our own lockfile? */
- lock_fd = open(pid_path, O_RDWR | O_CREAT | O_EXCL
-#ifdef WIN32
- /* delete on close */
- | O_TEMPORARY
+#ifndef WIN32
+ lock_fd = open(pid_path, O_RDWR | O_CREAT | O_EXCL, pg_file_create_mode);
+#else
+ /* delete on close */
+ lock_fd = open(pid_path, O_RDWR | O_CREAT | O_EXCL | O_TEMPORARY,
+ pg_file_create_mode);
#endif
- , pg_file_create_mode);
if (lock_fd == -1)
{