Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit82f8c45

Browse files
committed
pg_alterckey: adjust doc build and Win32 sleep/open build fails
Fix for commit62afb42.Reported-by: Tom LaneDiscussion:https://postgr.es/m/1252111.1608953815@sss.pgh.pa.usBackpatch-through: master
1 parent7705f8c commit82f8c45

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

‎doc/src/sgml/ref/allfiles.sgml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ Complete list of usable sgml source files in this directory.
189189
<!ENTITY values SYSTEM "values.sgml">
190190

191191
<!-- applications and utilities -->
192+
<!ENTITY pgalterckey SYSTEM "pg_alterckey.sgml">
192193
<!ENTITY clusterdb SYSTEM "clusterdb.sgml">
193194
<!ENTITY createdb SYSTEM "createdb.sgml">
194195
<!ENTITY createuser SYSTEM "createuser.sgml">
@@ -215,7 +216,7 @@ Complete list of usable sgml source files in this directory.
215216
<!ENTITY pgtestfsync SYSTEM "pgtestfsync.sgml">
216217
<!ENTITY pgtesttiming SYSTEM "pgtesttiming.sgml">
217218
<!ENTITY pgupgrade SYSTEM "pgupgrade.sgml">
218-
<!ENTITY pgwaldump SYSTEM "pg_waldump.sgml">
219+
<!ENTITY pgwaldumpSYSTEM "pg_waldump.sgml">
219220
<!ENTITY postgres SYSTEM "postgres-ref.sgml">
220221
<!ENTITY postmaster SYSTEM "postmaster.sgml">
221222
<!ENTITY psqlRef SYSTEM "psql-ref.sgml">
File renamed without changes.

‎src/bin/pg_alterckey/pg_alterckey.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,16 +343,17 @@ create_lockfile(void)
343343
unlink(pid_path);
344344

345345
/* Sleep to reduce the likelihood of concurrent unlink */
346-
sleep(2);
346+
pg_usleep(2000000L);/* 2 seconds */
347347
}
348348

349349
/* Create our own lockfile? */
350-
lock_fd=open(pid_path,O_RDWR |O_CREAT |O_EXCL
351-
#ifdefWIN32
352-
/* delete on close */
353-
|O_TEMPORARY
350+
#ifndefWIN32
351+
lock_fd=open(pid_path,O_RDWR |O_CREAT |O_EXCL,pg_file_create_mode);
352+
#else
353+
/* delete on close */
354+
lock_fd=open(pid_path,O_RDWR |O_CREAT |O_EXCL |O_TEMPORARY,
355+
pg_file_create_mode);
354356
#endif
355-
,pg_file_create_mode);
356357

357358
if (lock_fd==-1)
358359
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp