From 0804cee992872f4d4bb1c12edf027da3027dcc28 Mon Sep 17 00:00:00 2001
From: Zhihong Yu <zyu@yugabyte.com>
Date: Fri, 10 Sep 2021 11:28:17 -0700
Subject: [PATCH 01/33] incorrect file names in header comment

awk by Justin, patch by Zhihong Yu

find src -name '*.[ch]' -type f -print0 |xargs -r0 awk '{fn=gensub(".*/", "", "1", FILENAME)} FILENAME~/scripts/{fn=gensub("\\.c","", 1, fn)} FNR==1 && /---$/{top=1} /\*\//{top=0} !top{next} FNR>1 && FNR<4 && NF==2 && $2!=fn{print FILENAME,"head",fn,$2} /IDENTIFICATION/{getline; if ($0!~FILENAME){print FILENAME,"foot",$2}}'
---
 src/backend/catalog/pg_publication.c            | 2 +-
 src/backend/commands/publicationcmds.c          | 2 +-
 src/backend/commands/subscriptioncmds.c         | 2 +-
 src/backend/optimizer/util/appendinfo.c         | 2 +-
 src/backend/optimizer/util/inherit.c            | 2 +-
 src/backend/replication/logical/logicalfuncs.c  | 2 +-
 src/backend/replication/logical/reorderbuffer.c | 2 +-
 src/backend/replication/logical/snapbuild.c     | 2 +-
 src/backend/utils/activity/backend_progress.c   | 4 ++--
 src/backend/utils/activity/backend_status.c     | 2 +-
 src/backend/utils/activity/wait_event.c         | 2 +-
 src/include/replication/pgoutput.h              | 2 +-
 src/include/utils/dynahash.h                    | 5 +++--
 src/port/pgcheckdir.c                           | 4 +++-
 14 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/src/backend/catalog/pg_publication.c b/src/backend/catalog/pg_publication.c
index cf0700f8ba0..e14ca2f5630 100644
--- a/src/backend/catalog/pg_publication.c
+++ b/src/backend/catalog/pg_publication.c
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *		pg_publication.c
+ *		src/backend/catalog/pg_publication.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c
index 3ab1bdeae1b..0e4bb97fb73 100644
--- a/src/backend/commands/publicationcmds.c
+++ b/src/backend/commands/publicationcmds.c
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *		publicationcmds.c
+ *		src/backend/commands/publicationcmds.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index f5eba450ceb..3ef6607d246 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *		subscriptioncmds.c
+ *		src/backend/commands/subscriptioncmds.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/optimizer/util/appendinfo.c b/src/backend/optimizer/util/appendinfo.c
index b8039c323b6..2f06fa743c2 100644
--- a/src/backend/optimizer/util/appendinfo.c
+++ b/src/backend/optimizer/util/appendinfo.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  src/backend/optimizer/path/appendinfo.c
+ *	  src/backend/optimizer/util/appendinfo.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/optimizer/util/inherit.c b/src/backend/optimizer/util/inherit.c
index 8c5dc659474..7e134822f36 100644
--- a/src/backend/optimizer/util/inherit.c
+++ b/src/backend/optimizer/util/inherit.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  src/backend/optimizer/path/inherit.c
+ *	  src/backend/optimizer/util/inherit.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/replication/logical/logicalfuncs.c b/src/backend/replication/logical/logicalfuncs.c
index 4f633888b4f..4d71e71f686 100644
--- a/src/backend/replication/logical/logicalfuncs.c
+++ b/src/backend/replication/logical/logicalfuncs.c
@@ -9,7 +9,7 @@
  * Copyright (c) 2012-2022, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *	  src/backend/replication/logicalfuncs.c
+ *	  src/backend/replication/logical/logicalfuncs.c
  *-------------------------------------------------------------------------
  */
 
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index d317a626e1e..19b2ba2000c 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  src/backend/replication/reorderbuffer.c
+ *	  src/backend/replication/logical/reorderbuffer.c
  *
  * NOTES
  *	  This module gets handed individual pieces of transactions in the order
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index ab04e946bc2..83fca8a77d9 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -110,7 +110,7 @@
  * Copyright (c) 2012-2022, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *	  src/backend/replication/snapbuild.c
+ *	  src/backend/replication/logical/snapbuild.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/utils/activity/backend_progress.c b/src/backend/utils/activity/backend_progress.c
index e5958fa77c5..f29199725b7 100644
--- a/src/backend/utils/activity/backend_progress.c
+++ b/src/backend/utils/activity/backend_progress.c
@@ -1,11 +1,11 @@
 /* ----------
- * progress.c
+ * backend_progress.c
  *
  *	Command progress reporting infrastructure.
  *
  *	Copyright (c) 2001-2022, PostgreSQL Global Development Group
  *
- *	src/backend/postmaster/progress.c
+ *	src/backend/utils/activity/backend_progress.c
  * ----------
  */
 #include "postgres.h"
diff --git a/src/backend/utils/activity/backend_status.c b/src/backend/utils/activity/backend_status.c
index 2fecf26a2c3..c7ed1e6d7ac 100644
--- a/src/backend/utils/activity/backend_status.c
+++ b/src/backend/utils/activity/backend_status.c
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *	  src/backend/postmaster/backend_status.c
+ *	  src/backend/utils/activity/backend_status.c
  * ----------
  */
 #include "postgres.h"
diff --git a/src/backend/utils/activity/wait_event.c b/src/backend/utils/activity/wait_event.c
index 0f5f18f02e0..36c4c0fd052 100644
--- a/src/backend/utils/activity/wait_event.c
+++ b/src/backend/utils/activity/wait_event.c
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *	  src/backend/postmaster/wait_event.c
+ *	  src/backend/utils/activity/wait_event.c
  *
  * NOTES
  *
diff --git a/src/include/replication/pgoutput.h b/src/include/replication/pgoutput.h
index fe1d0892aa6..78aa9151ef5 100644
--- a/src/include/replication/pgoutput.h
+++ b/src/include/replication/pgoutput.h
@@ -6,7 +6,7 @@
  * Copyright (c) 2015-2022, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *		pgoutput.h
+ *		src/include/replication/pgoutput.h
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/include/utils/dynahash.h b/src/include/utils/dynahash.h
index 28fa58a6629..4564fb2467a 100644
--- a/src/include/utils/dynahash.h
+++ b/src/include/utils/dynahash.h
@@ -1,13 +1,14 @@
 /*-------------------------------------------------------------------------
  *
- * dynahash
+ * dynahash.h
  *	  POSTGRES dynahash.h file definitions
  *
  *
  * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * src/include/utils/dynahash.h
+ * IDENTIFICATION
+ *		src/include/utils/dynahash.h
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/port/pgcheckdir.c b/src/port/pgcheckdir.c
index 75dbb147d71..6c09cf29810 100644
--- a/src/port/pgcheckdir.c
+++ b/src/port/pgcheckdir.c
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
  *
- * src/port/pgcheckdir.c
+ * pgcheckdir.c
  *
  * A simple subroutine to check whether a directory exists and is empty or not.
  * Useful in both initdb and the backend.
@@ -8,6 +8,8 @@
  * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
+ * IDENTIFICATION
+ *		src/port/pgcheckdir.c
  *-------------------------------------------------------------------------
  */
 
-- 
2.17.1

