diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index a647342948..7f0fd8e440 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -447,7 +447,6 @@ static char *format_preparedparamsdata(PLpgSQL_execstate *estate,
 static PLpgSQL_variable *make_callstmt_target(PLpgSQL_execstate *estate,
 											  PLpgSQL_expr *expr);
 
-
 /* ----------
  * plpgsql_exec_function	Called by the call handler for
  *				function execution.
@@ -1617,6 +1616,7 @@ exec_toplevel_block(PLpgSQL_execstate *estate, PLpgSQL_stmt_block *block)
 	/* Let the plugin know that we are about to execute this statement */
 	if (*plpgsql_plugin_ptr && (*plpgsql_plugin_ptr)->stmt_beg)
 		((*plpgsql_plugin_ptr)->stmt_beg) (estate, (PLpgSQL_stmt *) block);
+	elog(NOTICE, "stmt_beg toplevel_block");
 
 	CHECK_FOR_INTERRUPTS();
 
@@ -1625,6 +1625,7 @@ exec_toplevel_block(PLpgSQL_execstate *estate, PLpgSQL_stmt_block *block)
 	/* Let the plugin know that we have finished executing this statement */
 	if (*plpgsql_plugin_ptr && (*plpgsql_plugin_ptr)->stmt_end)
 		((*plpgsql_plugin_ptr)->stmt_end) (estate, (PLpgSQL_stmt *) block);
+	elog(NOTICE, "stmt_end toplevel_block");
 
 	estate->err_stmt = NULL;
 
@@ -1996,6 +1997,7 @@ exec_stmts(PLpgSQL_execstate *estate, List *stmts)
 		/* Let the plugin know that we are about to execute this statement */
 		if (*plpgsql_plugin_ptr && (*plpgsql_plugin_ptr)->stmt_beg)
 			((*plpgsql_plugin_ptr)->stmt_beg) (estate, stmt);
+		elog(NOTICE, "stmt_beg stmt %s", plpgsql_stmt_typename(stmt));
 
 		CHECK_FOR_INTERRUPTS();
 
@@ -2119,6 +2121,7 @@ exec_stmts(PLpgSQL_execstate *estate, List *stmts)
 		/* Let the plugin know that we have finished executing this statement */
 		if (*plpgsql_plugin_ptr && (*plpgsql_plugin_ptr)->stmt_end)
 			((*plpgsql_plugin_ptr)->stmt_end) (estate, stmt);
+		elog(NOTICE, "stmt_end stmt %s", plpgsql_stmt_typename(stmt));
 
 		if (rc != PLPGSQL_RC_OK)
 		{
