oid2name : add objects file path - Mailing list pgsql-hackers

From David Bidoc
Subject oid2name : add objects file path
Date
Msg-id CABour1v2CU1wjjoM86wAFyezJQ3-+ncH43zY1f1uXeVojVN8Ow@mail.gmail.com
Whole thread Raw
Responses Re: oid2name : add objects file path
List pgsql-hackers
Hello,

This is my first patch to the project.

I noticed that the oid2name tool does not display the file path of objects.

I thought this could be interesting and that others might find it useful, so I made a little patch to display the full path of objects retrieved by the oid2name tool. These will be displayed using the -x --extended option.

$ oid2name -p 5435 -x
All databases:
    Oid  Database Name  Tablespace    Filepath
----------------------------------------------
  16392             b1  pg_default  base/16392
      5       postgres  pg_default      base/5
      4      template0  pg_default      base/4
      1      template1  pg_default      base/1

$ oid2name -p 5435 -d b1 -x
From database "b1":
  Filenode  Table Name    Oid  Schema  Tablespace          Filepath
-------------------------------------------------------------------
     16393          t1  16393  public  pg_default  base/16392/16393

$ oid2name -p 5435 -d b1 -i -x
From database "b1":
  Filenode  Table Name    Oid  Schema  Tablespace          Filepath
-------------------------------------------------------------------
     16393          t1  16393  public  pg_default  base/16392/16393
     16396   t1_c1_idx  16396  public  pg_default  base/16392/16396

Regards

David Bidoc
Attachment

pgsql-hackers by date:

Previous
From: Michael Banck
Date:
Subject: Re: GiST nitpicks I want to discuss (and maybe eventually fix)
Next
From: Kirill Reshke
Date:
Subject: Re: Remove custom redundant full page write description from GIN