doc: Fix example query for pg_walinspect
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Thu, 25 May 2023 10:43:16 +0000 (12:43 +0200)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Thu, 25 May 2023 10:43:16 +0000 (12:43 +0200)
The LIMIT clause had ended up in the wrong place in the query.
Backpatch to v15 where pg_walinspect was introduced.

Reported-by: Jian He <jian.universality@gmail.com>
Discussion: https://postgr.es/m/CACJufxHqXDr4NnmwmR6pEiVPAg54J0dgwMuYQzrH5BX6+NtF1g@mail.gmail.com
Backpatch-through: 15

doc/src/sgml/pgwalinspect.sgml

index a1a4422fb42c8d0c1e98418048df959b0f688140..762ad6981767cbe841859142e2efc04d2a885dc1 100644 (file)
@@ -250,8 +250,9 @@ block_fpi_data    |
       For example:
 <screen>
 postgres=# SELECT * FROM pg_get_wal_stats('0/1E847D00', '0/1E84F500')
-             WHERE count > 0 LIMIT 1 AND
-                   "resource_manager/record_type" = 'Transaction';
+           WHERE count > 0 AND
+                 "resource_manager/record_type" = 'Transaction'
+           LIMIT 1;
 -[ RECORD 1 ]----------------+-------------------
 resource_manager/record_type | Transaction
 count                        | 2