mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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.
This commit is contained in:
@ -15,7 +15,7 @@ NOTICE: physical length: 0.08MB live tuples: 20 (0.00MB, 1.17%) dead tuples: 32
|
||||
18.75
|
||||
(1 row)
|
||||
|
||||
Above example shows tellers tables includes 18.75% dead tuples.
|
||||
Above example shows tellers table includes 18.75% dead tuples.
|
||||
|
||||
physical length physical size of the table in MB
|
||||
live tuples information on the live tuples
|
||||
@ -40,7 +40,7 @@ NOTICE: physical length: 0.08MB live tuples: 20 (0.00MB, 1.17%) dead tuples: 32
|
||||
|
||||
4. Notes
|
||||
|
||||
pgstattuple does not lock the target table at all. So concurrent
|
||||
pgstattuple acquires only a read lock on the table. So concurrent
|
||||
update may affect the result.
|
||||
|
||||
pgstattuple judges a tuple is "dead" if HeapTupleSatisfiesNow()
|
||||
|
Reference in New Issue
Block a user