diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml
index 7c76ab8c34..2de3309267 100644
--- a/doc/src/sgml/xfunc.sgml
+++ b/doc/src/sgml/xfunc.sgml
@@ -3935,7 +3935,7 @@ extern bool InjectionPointDetach(const char *name);
An example can be found in
- src/test/modules/test_custom_stats in the PostgreSQL
+ src/test/modules/injection_points in the PostgreSQL
source tree.
@@ -4005,7 +4005,7 @@ extern PgStat_Kind pgstat_register_kind(PgStat_Kind kind,
An example describing how to register and use custom statistics can be
- found in src/test/modules/injection_points.
+ found in src/test/modules/test_custom_stats.