Fix pgstattuple to acquire a read lock on the target table. This

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 897083715b282881e5d85ba55285708c24cc2abb
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2001-12-19T20:28:41Z
Releases: 7.2.1
Fix pgstattuple to acquire a read lock on the target table.  This
prevents embarassments such as having the table dropped or truncated
partway through the scan.  Also, fix free space calculation to include
pages that currently contain no tuples.

Files

PathChange+/−
contrib/pgstattuple/pgstattuple.c modified +36 −18
contrib/pgstattuple/README.pgstattuple modified +2 −2