diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 9856968..dacf40c 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -521,6 +521,13 @@ postgres   27093  0.0  0.0  30096  2752 ?        Ss   11:34   0:00 postgres: ser
       <command>VACUUM</>, showing current progress.
       See <xref linkend='vacuum-progress-reporting'>.</entry>
      </row>
+
+     <row>
+      <entry><structname>pg_stat_progress_analyze</><indexterm><primary>pg_stat_progress_analyze</primary></indexterm></entry>
+      <entry>One row for each backend running
+      <command>ANALYZE</>, showing current progress.
+      See <xref linkend='analyze-progress-reporting'>.</entry>
+     </row>
     </tbody>
    </tgroup>
   </table>
@@ -3186,9 +3193,8 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
 
   <para>
    <productname>PostgreSQL</> has the ability to report the progress of
-   certain commands during command execution.  Currently, the only command
-   which supports progress reporting is <command>VACUUM</>.  This may be
-   expanded in the future.
+   certain commands during command execution.  Currently, the supported progress 
+   reporting commands are <command>VACUUM</> and <command>ANALYZE</>.
   </para>
 
  <sect2 id="vacuum-progress-reporting">
@@ -3378,7 +3384,139 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
    </tbody>
    </tgroup>
   </table>
+ </sect2>
+
+ <sect2 id="analyze-progress-reporting">
+  <title>ANALYZE Progress Reporting</title>
+
+  <para>
+   Whenever <command>ANALYZE</> is running, the
+   <structname>pg_stat_progress_analyze</structname> view will contain
+   one row for each backend that is currently analyzing.
+   The tables below describe the information that will be reported and
+   provide information about how to interpret it. Currently the analyze
+   progress reporting facility is not supported for foreign table.
+  </para>
+
+  <table id="pg-stat-progress-analyze-view" xreflabel="pg_stat_progress_analyze">
+   <title><structname>pg_stat_progress_analyze</structname> View</title>
+   <tgroup cols="3">
+    <thead>
+    <row>
+      <entry>Column</entry>
+      <entry>Type</entry>
+      <entry>Description</entry>
+     </row>
+    </thead>
+
+   <tbody>
+    <row>
+     <entry><structfield>pid</></entry>
+     <entry><type>integer</></entry>
+     <entry>Process ID of backend.</entry>
+    </row>
+    <row>
+     <entry><structfield>datid</></entry>
+     <entry><type>oid</></entry>
+     <entry>OID of the database to which this backend is connected.</entry>
+    </row>
+    <row>
+     <entry><structfield>datname</></entry>
+     <entry><type>name</></entry>
+     <entry>Name of the database to which this backend is connected.</entry>
+    </row>
+    <row>
+     <entry><structfield>relid</></entry>
+     <entry><type>oid</></entry>
+     <entry>OID of the table being analyzed.</entry>
+    </row>
+    <row>
+     <entry><structfield>phase</></entry>
+     <entry><type>text</></entry>
+     <entry>
+       Current processing phase of analyze.  See <xref linkend='analyze-phases'>.
+     </entry>
+    </row>
+    <row>
+     <entry><structfield>child_relid</></entry>
+     <entry><type>bigint</></entry>
+     <entry>OID of the child table being sampled. If the table being analyzed has
+       one or more children, it will return child table relation id otherwise it will 
+       return NULL.</entry>
+    </row>
+    <row>
+     <entry><structfield>num_blks_total</></entry>
+     <entry><type>bigint</></entry>
+     <entry>Total number of blocks that will be sampled.</entry>
+    </row>
+    <row>
+     <entry><structfield>num_blks_selected</></entry>
+     <entry><type>bigint</></entry>
+     <entry>Total number of blocks selected for sampling so far.</entry>
+    </row>
+    <row>
+     <entry><structfield>num_target_sample_rows</></entry>
+     <entry><type>bigint</></entry>
+     <entry>
+       Total number of sample rows of the relation. The sample it reads
+       is taken randomly. Its size depends on the
+       <xref linkend="guc-default-statistics-target"> parameter value.
+     </entry>
+    </row>
+   </tbody>
+   </tgroup>
+  </table>
 
+  <table id="analyze-phases">
+   <title>ANALYZE phases</title>
+   <tgroup cols="2">
+    <thead>
+    <row>
+      <entry>Phase</entry>
+      <entry>Description</entry>
+     </row>
+    </thead>
+
+   <tbody>
+    <row>
+     <entry><literal>initializing</literal></entry>
+     <entry>
+       <command>ANALYZE</> is preparing to collect sample rows.
+     </entry>
+    </row>
+    <row>
+     <entry><literal>collecting sample rows</literal></entry>
+     <entry>
+       <command>ANALYZE</> is currently collecting the sample rows of
+       single relation. The sample it reads is taken randomly. Its size
+       depends on the <xref linkend="guc-default-statistics-target">
+       parameter value.
+     </entry>
+    </row>
+    <row>
+     <entry><literal>collecting inherited sample rows</literal></entry>
+     <entry>
+       <command>ANALYZE</> is currently collecting inherited sample rows.
+       If the table being analyzed has one or more children, this phase will
+       collect sample rows of parent table and all associated child relation.
+       The sample it reads is taken randomly. Its size depends on
+       the <xref linkend="guc-default-statistics-target"> parameter value.
+     </entry>
+    </row>
+    <row>
+     <entry><literal>computing statistics</literal></entry>
+     <entry>
+       On the collected sample <command>ANALYZE</> is currently computing some
+       statistical informations, such as the percentage of NULL values,
+       the average width of a row, the number of distinct values etc.
+       It also stores the most common values and their frequencies.
+       The number of these values depends on the value of the
+       <xref linkend="guc-default-statistics-target"> parameter.
+     </entry>
+    </row>
+   </tbody>
+   </tgroup>
+  </table>
  </sect2>
  </sect1>
 
diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql
index 0217f39..3e2ef59 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -909,6 +909,22 @@ CREATE VIEW pg_stat_progress_vacuum AS
     FROM pg_stat_get_progress_info('VACUUM') AS S
 		LEFT JOIN pg_database D ON S.datid = D.oid;
 
+CREATE VIEW pg_stat_progress_analyze AS
+	SELECT
+		S.pid AS pid, S.datid AS datid, D.datname AS datname,
+		S.relid AS relid,
+		CASE S.param1 WHEN 0 THEN 'initializing'
+					  WHEN 1 THEN 'collecting sample rows'
+					  WHEN 2 THEN 'collecting inherited sample rows'
+					  WHEN 3 THEN 'computing statistics'
+					  END AS phase,
+		S.param2 AS child_relid,
+		S.param3 AS num_blks_total,
+		S.param4 AS num_blks_selected,
+		S.param5 AS num_target_sample_rows
+    FROM pg_stat_get_progress_info('ANALYZE') AS S
+		LEFT JOIN pg_database D ON S.datid = D.oid;
+
 CREATE VIEW pg_user_mappings AS
     SELECT
         U.oid       AS umid,
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index 404acb2..587c926 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -33,6 +33,7 @@
 #include "commands/dbcommands.h"
 #include "commands/tablecmds.h"
 #include "commands/vacuum.h"
+#include "commands/progress.h"
 #include "executor/executor.h"
 #include "foreign/fdwapi.h"
 #include "miscadmin.h"
@@ -263,10 +264,16 @@ analyze_rel(Oid relid, RangeVar *relation, int options,
 	MyPgXact->vacuumFlags |= PROC_IN_ANALYZE;
 	LWLockRelease(ProcArrayLock);
 
+	/* Report that we are going to start analyzing onerel. */
+	pgstat_progress_start_command(PROGRESS_COMMAND_ANALYZE,
+								  RelationGetRelid(onerel));
+
 	/*
 	 * Do the normal non-recursive ANALYZE.  We can skip this for partitioned
 	 * tables, which don't contain any rows.
 	 */
+	pgstat_progress_update_param(PROGRESS_ANALYZE_PHASE,
+								 PROGRESS_ANALYZE_PHASE_COLLECT_SAMPLE_ROWS);
 	if (onerel->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
 		do_analyze_rel(onerel, options, params, va_cols, acquirefunc,
 					   relpages, false, in_outer_xact, elevel);
@@ -275,8 +282,15 @@ analyze_rel(Oid relid, RangeVar *relation, int options,
 	 * If there are child tables, do recursive ANALYZE.
 	 */
 	if (onerel->rd_rel->relhassubclass)
+	{
+		pgstat_progress_update_param(PROGRESS_ANALYZE_PHASE,
+							 PROGRESS_ANALYZE_PHASE_COLLECT_INH_SAMPLE_ROWS);
 		do_analyze_rel(onerel, options, params, va_cols, acquirefunc, relpages,
 					   true, in_outer_xact, elevel);
+	}
+
+	/* We're done analyzing. */
+	pgstat_progress_end_command();
 
 	/*
 	 * Close source relation now, but keep lock so that no one deletes it
@@ -493,6 +507,11 @@ do_analyze_rel(Relation onerel, int options, VacuumParams *params,
 	/*
 	 * Acquire the sample rows
 	 */
+
+	/* Report the number of target sample rows */
+	pgstat_progress_update_param(PROGRESS_ANALYZE_NUM_TARGET_SAMPLE_ROWS,
+								 targrows);
+
 	rows = (HeapTuple *) palloc(targrows * sizeof(HeapTuple));
 	if (inh)
 		numrows = acquire_inherited_sample_rows(onerel, elevel,
@@ -509,6 +528,11 @@ do_analyze_rel(Relation onerel, int options, VacuumParams *params,
 	 * responsible to make sure that whatever they store into the VacAttrStats
 	 * structure is allocated in anl_context.
 	 */
+
+	/* Report that statistics will now be computed. */
+	pgstat_progress_update_param(PROGRESS_ANALYZE_PHASE,
+								 PROGRESS_ANALYZE_PHASE_COMPUTE_STATS);
+
 	if (numrows > 0)
 	{
 		MemoryContext col_context,
@@ -1416,6 +1440,9 @@ acquire_inherited_sample_rows(Relation onerel, int elevel,
 		AcquireSampleRowsFunc acquirefunc = acquirefuncs[i];
 		double		childblocks = relblocks[i];
 
+		/* Report child relid which is currently collecting sample rows */
+		pgstat_progress_update_param(PROGRESS_ANALYZE_CHILD_REL, RelationGetRelid(childrel));
+
 		if (childblocks > 0)
 		{
 			int			childtargrows;
@@ -1466,6 +1493,8 @@ acquire_inherited_sample_rows(Relation onerel, int elevel,
 				*totaldeadrows += tdrows;
 			}
 		}
+		/* We're done collecting sample rows from child relation */
+		pgstat_progress_update_param(PROGRESS_ANALYZE_CHILD_REL, 0);
 
 		/*
 		 * Note: we cannot release the child-table locks, since we may have
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index e0cae1b..5a2a48e 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -467,6 +467,8 @@ pg_stat_get_progress_info(PG_FUNCTION_ARGS)
 	/* Translate command name into command type code. */
 	if (pg_strcasecmp(cmd, "VACUUM") == 0)
 		cmdtype = PROGRESS_COMMAND_VACUUM;
+	else if (pg_strcasecmp(cmd, "ANALYZE") == 0)
+		cmdtype = PROGRESS_COMMAND_ANALYZE;
 	else
 		ereport(ERROR,
 				(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
diff --git a/src/backend/utils/misc/sampling.c b/src/backend/utils/misc/sampling.c
index c36459e..bb506ba 100644
--- a/src/backend/utils/misc/sampling.c
+++ b/src/backend/utils/misc/sampling.c
@@ -18,6 +18,7 @@
 #include <math.h>
 
 #include "utils/sampling.h"
+#include "commands/progress.h"
 
 
 /*
@@ -39,6 +40,9 @@ BlockSampler_Init(BlockSampler bs, BlockNumber nblocks, int samplesize,
 {
 	bs->N = nblocks;			/* measured table size */
 
+	/* Report total number of blocks taht will be sampled */
+	pgstat_progress_update_param(PROGRESS_ANALYZE_TOTAL_BLOCKS, bs->N);
+
 	/*
 	 * If we decide to reduce samplesize for tables that have less or not much
 	 * more than samplesize blocks, here is the place to do it.
@@ -70,6 +74,10 @@ BlockSampler_Next(BlockSampler bs)
 	{
 		/* need all the rest */
 		bs->m++;
+
+		/* Report blocks selected so far */
+		pgstat_progress_update_param(PROGRESS_ANALYZE_BLOCKS_SELECTED, bs->m);
+
 		return bs->t++;
 	}
 
diff --git a/src/include/commands/progress.h b/src/include/commands/progress.h
index 9472ecc..32ec41d 100644
--- a/src/include/commands/progress.h
+++ b/src/include/commands/progress.h
@@ -34,4 +34,16 @@
 #define PROGRESS_VACUUM_PHASE_TRUNCATE			5
 #define PROGRESS_VACUUM_PHASE_FINAL_CLEANUP		6
 
+/* Progress parameters for analyze */
+#define PROGRESS_ANALYZE_PHASE					0
+#define PROGRESS_ANALYZE_CHILD_REL				1
+#define PROGRESS_ANALYZE_TOTAL_BLOCKS			2
+#define PROGRESS_ANALYZE_BLOCKS_SELECTED		3
+#define PROGRESS_ANALYZE_NUM_TARGET_SAMPLE_ROWS	4
+
+/* Phases of analyze (as advertised via PROGRESS_ANALYZE_PHASE) */
+#define PROGRESS_ANALYZE_PHASE_COLLECT_SAMPLE_ROWS		1
+#define PROGRESS_ANALYZE_PHASE_COLLECT_INH_SAMPLE_ROWS	2
+#define PROGRESS_ANALYZE_PHASE_COMPUTE_STATS			3
+
 #endif
diff --git a/src/include/pgstat.h b/src/include/pgstat.h
index e29397f..2141593 100644
--- a/src/include/pgstat.h
+++ b/src/include/pgstat.h
@@ -911,7 +911,8 @@ typedef enum
 typedef enum ProgressCommandType
 {
 	PROGRESS_COMMAND_INVALID,
-	PROGRESS_COMMAND_VACUUM
+	PROGRESS_COMMAND_VACUUM,
+	PROGRESS_COMMAND_ANALYZE
 } ProgressCommandType;
 
 #define PGSTAT_NUM_PROGRESS_PARAM	10
diff --git a/src/test/regress/expected/rules.out b/src/test/regress/expected/rules.out
index d706f42..d84ac8f 100644
--- a/src/test/regress/expected/rules.out
+++ b/src/test/regress/expected/rules.out
@@ -1819,6 +1819,23 @@ pg_stat_database_conflicts| SELECT d.oid AS datid,
     pg_stat_get_db_conflict_bufferpin(d.oid) AS confl_bufferpin,
     pg_stat_get_db_conflict_startup_deadlock(d.oid) AS confl_deadlock
    FROM pg_database d;
+pg_stat_progress_analyze| SELECT s.pid,
+    s.datid,
+    d.datname,
+    s.relid,
+        CASE s.param1
+            WHEN 0 THEN 'initializing'::text
+            WHEN 1 THEN 'collecting sample rows'::text
+            WHEN 2 THEN 'collecting inherited sample rows'::text
+            WHEN 3 THEN 'computing statistics'::text
+            ELSE NULL::text
+        END AS phase,
+    s.param2 AS child_relid,
+    s.param3 AS num_blks_total,
+    s.param4 AS num_blks_selected,
+    s.param5 AS num_target_sample_rows
+   FROM (pg_stat_get_progress_info('ANALYZE'::text) s(pid, datid, relid, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10)
+     LEFT JOIN pg_database d ON ((s.datid = d.oid)));
 pg_stat_progress_vacuum| SELECT s.pid,
     s.datid,
     d.datname,
