Fix a comment in CreateLockFile

Started by Hadi Moshayediabout 6 years ago3 messages
#1Hadi Moshayedi
hadi@moshayedi.net
1 attachment(s)

It seems that explanation for the contents of the pid file has moved to
pidfile.h, but the comments in CreateLockFile() still point to miscadmin.h.

The attached patch updates those pointers.

Attachments:

fix-typo-CreateLockFile.patchtext/x-patch; charset=US-ASCII; name=fix-typo-CreateLockFile.patchDownload
diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c
index 83c9514856..de554e28cf 100644
--- a/src/backend/utils/init/miscinit.c
+++ b/src/backend/utils/init/miscinit.c
@@ -822,7 +822,7 @@ GetUserNameFromId(Oid roleid, bool noerr)
  * ($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 pidfile.h for documentation of the contents
  * of these lockfiles.
  *
  * On successful lockfile creation, a proc_exit callback to remove the
@@ -1089,7 +1089,7 @@ CreateLockFile(const char *filename, bool amPostmaster,
 	}
 
 	/*
-	 * Successfully created the file, now fill it.  See comment in miscadmin.h
+	 * Successfully created the file, now fill it.  See comment in pidfile.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.
#2Amit Kapila
amit.kapila16@gmail.com
In reply to: Hadi Moshayedi (#1)
Re: Fix a comment in CreateLockFile

On Sun, Dec 8, 2019 at 1:10 PM Hadi Moshayedi <hadi@moshayedi.net> wrote:

It seems that explanation for the contents of the pid file has moved to pidfile.h, but the comments in CreateLockFile() still point to miscadmin.h.

The attached patch updates those pointers.

Your patch looks correct to me on a quick look. I will take of this tomorrow.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#3Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#2)
Re: Fix a comment in CreateLockFile

On Sun, Dec 8, 2019 at 4:32 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Sun, Dec 8, 2019 at 1:10 PM Hadi Moshayedi <hadi@moshayedi.net> wrote:

It seems that explanation for the contents of the pid file has moved to pidfile.h, but the comments in CreateLockFile() still point to miscadmin.h.

The attached patch updates those pointers.

Your patch looks correct to me on a quick look. I will take of this tomorrow.

Pushed.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com