diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index 4cd4bcba80..b6d9773573 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -3667,6 +3667,15 @@ CALL transaction_test1();
     CHAIN</command> accomplish this.
    </para>
 
+   <note>
+     <para>
+       If you have a client application waiting for a <literal>NOTIFY</literal>
+       event coming from this transaction, be aware that the notification will
+       only be sent after a <literal>COMMIT</literal> or a <literal>ROLLBACK</literal>
+       without <literal>AND CHAIN</literal> happens.
+     </para>
+   </note>
+
    <para>
     Transaction control is only possible in <command>CALL</command> or
     <command>DO</command> invocations from the top level or nested
diff --git a/doc/src/sgml/ref/commit.sgml b/doc/src/sgml/ref/commit.sgml
index 5f244cdd3c..ebf4741b37 100644
--- a/doc/src/sgml/ref/commit.sgml
+++ b/doc/src/sgml/ref/commit.sgml
@@ -62,7 +62,15 @@ COMMIT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
       linkend="sql-set-transaction"/>) as the just finished one.  Otherwise,
       no new transaction is started.
      </para>
-    </listitem>
+     <note>
+       <para>
+         If you have a client application waiting for a <literal>NOTIFY</literal>
+         event coming from this transaction, be aware that the notification will
+         only be sent when a <literal>COMMIT</literal> or a <literal>ROLLBACK</literal>
+         without <literal>AND CHAIN</literal> will be issued.
+       </para>
+     </note>
+   </listitem>
    </varlistentry>
   </variablelist>
  </refsect1>
diff --git a/doc/src/sgml/ref/end.sgml b/doc/src/sgml/ref/end.sgml
index 498652919a..8a05c05d14 100644
--- a/doc/src/sgml/ref/end.sgml
+++ b/doc/src/sgml/ref/end.sgml
@@ -60,6 +60,14 @@ END [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
       linkend="sql-set-transaction"/>) as the just finished one.  Otherwise,
       no new transaction is started.
      </para>
+     <note>
+       <para>
+         If you have a client application waiting for a <literal>NOTIFY</literal>
+         event coming from this transaction, be aware that the notification will
+         only be sent after a <literal>COMMIT</literal> or a <literal>ROLLBACK</literal>
+         without <literal>AND CHAIN</literal> happens.
+       </para>
+     </note>
     </listitem>
    </varlistentry>
   </variablelist>
diff --git a/doc/src/sgml/ref/notify.sgml b/doc/src/sgml/ref/notify.sgml
index d7dcbea02d..020ff3d569 100644
--- a/doc/src/sgml/ref/notify.sgml
+++ b/doc/src/sgml/ref/notify.sgml
@@ -121,6 +121,14 @@ NOTIFY <replaceable class="parameter">channel</replaceable> [ , <replaceable cla
    are the same, the notification event is one's own work bouncing
    back, and can be ignored.
   </para>
+     <note>
+       <para>
+         If you have a client application waiting for a <literal>NOTIFY</literal>
+         event coming from this transaction, be aware that the notification will
+         only be sent after a <literal>COMMIT</literal> or a <literal>ROLLBACK</literal>
+         without <literal>AND CHAIN</literal> happens.
+       </para>
+     </note>
  </refsect1>
 
  <refsect1>
diff --git a/doc/src/sgml/ref/rollback.sgml b/doc/src/sgml/ref/rollback.sgml
index 142f71e774..9bb57369ff 100644
--- a/doc/src/sgml/ref/rollback.sgml
+++ b/doc/src/sgml/ref/rollback.sgml
@@ -61,6 +61,14 @@ ROLLBACK [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
       linkend="sql-set-transaction"/>) as the just finished one.  Otherwise,
       no new transaction is started.
      </para>
+     <note>
+       <para>
+         If you have a client application waiting for a <literal>NOTIFY</literal>
+         event coming from this transaction, be aware that the notification will
+         only be sent when a <literal>COMMIT</literal> or a <literal>ROLLBACK</literal>
+         without <literal>AND CHAIN</literal> will be issued.
+       </para>
+     </note>
     </listitem>
    </varlistentry>
   </variablelist>
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 6597ec45a9..84e6a4225e 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -3006,6 +3006,12 @@ CommitTransactionCommand(void)
 			s->blockState = TBLOCK_DEFAULT;
 			if (s->chain)
 			{
+				/*
+				 * Before starting the new transaction, we'll update the
+				 * statistics so that autovacuum can be triggered without
+				 * waiting for a `commit` or `rollback` without `and chain`.
+				 */
+				pgstat_report_stat(false);
 				StartTransaction();
 				s->blockState = TBLOCK_INPROGRESS;
 				s->chain = false;
@@ -3032,6 +3038,12 @@ CommitTransactionCommand(void)
 			s->blockState = TBLOCK_DEFAULT;
 			if (s->chain)
 			{
+				/*
+				 * Before starting the new transaction, we'll update the
+				 * statistics so that autovacuum can be triggered without
+				 * waiting for a `commit` or `rollback` without `and chain`.
+				 */
+				pgstat_report_stat(false);
 				StartTransaction();
 				s->blockState = TBLOCK_INPROGRESS;
 				s->chain = false;
@@ -3050,6 +3062,12 @@ CommitTransactionCommand(void)
 			s->blockState = TBLOCK_DEFAULT;
 			if (s->chain)
 			{
+				/*
+				 * Before starting the new transaction, we'll update the
+				 * statistics so that autovacuum can be triggered without
+				 * waiting for a `commit` or `rollback` without `and chain`.
+				 */
+				pgstat_report_stat(false);
 				StartTransaction();
 				s->blockState = TBLOCK_INPROGRESS;
 				s->chain = false;
@@ -3117,6 +3135,12 @@ CommitTransactionCommand(void)
 				s->blockState = TBLOCK_DEFAULT;
 				if (s->chain)
 				{
+					/*
+					 * Before starting the new transaction, we'll update the
+					 * statistics so that autovacuum can be triggered without
+					 * waiting for a `commit` or `rollback` without `and chain`.
+					 */
+					pgstat_report_stat(false);
 					StartTransaction();
 					s->blockState = TBLOCK_INPROGRESS;
 					s->chain = false;
