Add pg_relation_by_filenode(reltbspc, filenode) admin function

Andres Freund <andres@2ndquadrant.com>

From: Andres Freund <andres@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>, pgsql-hackers@postgresql.org
Date: 2012-09-16T22:15:35Z
Lists: pgsql-hackers
Now that I proposed a new syscache upthread its easily possible to provide
pg_relation_by_filenode which I wished for multiple times in the past when
looking at filesystem activity and wondering which table does what. You can
sortof get the same result via

SELECT oid FROM (
       SELECT oid, pg_relation_filenode(oid::regclass) filenode
       FROM pg_class WHERE relkind != 'v'
) map
WHERE map.filenode = ...;

but thats neither efficient nor obvious.

So, two patches to do this:


Did others need this in the past? I can live with the 2nd patch living in a
private extension somewhere. The first one would also be useful for some
error/debug messages during decoding...

Greetings,

Andres


Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Move "hot" members of PGPROC into a separate PGXACT array.