[Eug-lug] Translate file name to Postgres DB name

Ben Barrett stircrazyben at gmail.com
Wed Jan 31 14:16:52 PST 2007


strings?

(can you run strings on it?)  I'm sure there is a better solution,
but strings is easy :)   (strings myfile | less)
Staying in the hackish realm, you can use lsof to see what files are open;
I would guess the DB engine keeps a handle on all its files though...
so that may not help differentiate between active tables.

ben

PS - Google was able to tell me that the number inside
/var/lib/pgsql/data/base/
is the OID (Object Identifier) of the that DB.
I'm not familiar enough with Postgres to know where to correlate that...
sorry :)
Knowing that, and that pgsql is threaded, you could do the lsof method I
suggested above,
and launch a bunch of queries to a specific DB/table to see what changes
while
the queries run (ie, do a... lsof|grep -c 16982 ... and when the number
returned is
higher, you're queryign that table... dirty hack).


On 1/31/07, Matthew Jarvis <mattj at bikefriday.com> wrote:
>
> Rob Hudson wrote:
> > I think Matt's asking if you can determine which files related to which
> > tables...
> >
>
> Ya, what _he_ said...  <g>
>
> Matthew S. Jarvis
> IT Manager
> Bike Friday - "Performance that Packs."
> www.bikefriday.com
> 541/687-0487 x140
> mattj at bikefriday.com
> _______________________________________________
> EUGLUG mailing list
> euglug at euglug.org
> http://www.euglug.org/mailman/listinfo/euglug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://euglug.org/pipermail/euglug/attachments/20070131/7e71548e/attac=
hment-0001.htm


More information about the EUGLUG mailing list