Thread: [GENERAL] Querying dead rows

[GENERAL] Querying dead rows

From
Rakesh Kumar
Date:
Is there a way to query dead rows (that is, rows which are dead and still not cleaned up by Vacuum) using SQL.  I am
askingthis just as an academical question. 


Re: [GENERAL] Querying dead rows

From
Stephen Frost
Date:
* Rakesh Kumar (rakeshkumar464@outlook.com) wrote:
> Is there a way to query dead rows (that is, rows which are dead and still not cleaned up by Vacuum) using SQL.  I am
askingthis just as an academical question. 

CREATE EXTENSION pageinspect;

https://www.postgresql.org/docs/9.6/static/pageinspect.html

Thanks!

Stephen

Attachment

Re: [GENERAL] Querying dead rows

From
Albe Laurenz
Date:
Rakesh Kumar wrote:
> Is there a way to query dead rows (that is, rows which are dead and still not cleaned up by Vacuum)
> using SQL.  I am asking this just as an academical question.

Sort of.

You can use heap_page_item_attrs() from the pageinspect contrib module to get at the
data, but you will only see the binary representation.

If your question is motivated by security concerns, you cannot do this unless you
are a superuser.

Yours,
Laurenz Albe