diff --git a/doc/src/sgml/func/func-info.sgml b/doc/src/sgml/func/func-info.sgml
index 2f03766b67a..226a815916d 100644
--- a/doc/src/sgml/func/func-info.sgml
+++ b/doc/src/sgml/func/func-info.sgml
@@ -246,9 +246,17 @@
         request and is ahead of it in the wait queue (soft block).  When using
         parallel queries the result always lists client-visible process IDs
         (that is, <function>pg_backend_pid</function> results) even if the
-        actual lock is held or awaited by a child worker process.  As a result
-        of that, there may be duplicated PIDs in the result.  Also note that
-        when a prepared transaction holds a conflicting lock, it will be
+        actual lock is held or awaited by a child worker process. As a result
+        of that, there may be duplicated PIDs in the result. When members of
+        the same parallel lock group block each other on a relation extension
+        lock (shown as lock type <literal>extend</literal> in <link
+        linkend="view-pg-locks"><structname>pg_locks</structname></link>), the
+        specified process ID can also appear in the result. This does not mean
+        that a process blocks itself. Rather, a lock held by one member of its
+        parallel lock group blocks a lock request made by another member of that
+        group.
+        Also note that when a prepared transaction holds a conflicting lock,
+        it will be
         represented by a zero process ID.
        </para>
        <para>
diff --git a/src/backend/utils/adt/lockfuncs.c b/src/backend/utils/adt/lockfuncs.c
index 3eb9a5b4215..1f0cc2b9bcb 100644
--- a/src/backend/utils/adt/lockfuncs.c
+++ b/src/backend/utils/adt/lockfuncs.c
@@ -518,8 +518,14 @@ pg_blocking_pids(PG_FUNCTION_ARGS)
 			/* A proc never blocks itself, so ignore that entry */
 			if (instance == blocked_instance)
 				continue;
-			/* Members of same lock group never block each other, either */
-			if (instance->leaderPid == blocked_instance->leaderPid)
+
+			/*
+			 * Members of the same lock group do not block each other, except
+			 * when extending a relation.
+			 */
+			if (instance->leaderPid == blocked_instance->leaderPid &&
+				blocked_instance->locktag.locktag_type !=
+				LOCKTAG_RELATION_EXTEND)
 				continue;
 
 			if (conflictMask & instance->holdMask)
-- 
2.34.1
