Querying dead rows

Started by Rakesh Kumarover 9 years ago3 messagesgeneral
Jump to latest
#1Rakesh Kumar
rakeshkumar464@outlook.com

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.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Stephen Frost
sfrost@snowman.net
In reply to: Rakesh Kumar (#1)
Re: Querying dead rows

* 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 asking this just as an academical question.

CREATE EXTENSION pageinspect;

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

Thanks!

Stephen

#3Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Rakesh Kumar (#1)
Re: Querying dead rows

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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general