Обсуждение: tablespace directories

Поиск
Список
Период
Сортировка

tablespace directories

От
Bèrto ëd Sèra
Дата:
Hi all,

I have to monitor a number of pg physical files based on writing
access time. All fine, stats does it. I do, however, have a problem in
finding out where the files are. To get a list I'm using

select  oid,  spcname,  pg_tablespace_location(oid)
from pg_tablespace

however, the location is shorter then I would need (it simply records
how tblspcs were created).

My files are at

<creation path>/PG_9.2_201204301/417519

and I am quite struggling to understand how this final
PG_9.2_201204301/417519 part is generated. Is there any way I can dig
it out from the catalog?

Cheers
Bèrto

--
==============================
If Pac-Man had affected us as kids, we'd all be running around in a
darkened room munching pills and listening to repetitive music.



Re: tablespace directories

От
Bèrto ëd Sèra
Дата:
Hi again,

> <creation path>/PG_9.2_201204301/417519
This should really have been written

<creation path>/PG_9.2_201204301/<dboid>

the mystery is around the version_date (or so it would seem to be) part.

Cheers
Bèrto


--
==============================
If Pac-Man had affected us as kids, we'd all be running around in a
darkened room munching pills and listening to repetitive music.



Re: tablespace directories

От
Albe Laurenz
Дата:
QsOocnRvIMOrZCBTw6hyYSB3cm90ZToNCj4gPGNyZWF0aW9uIHBhdGg+L1BHXzkuMl8yMDEyMDQz
MDEvPGRib2lkPg0KPiANCj4gdGhlIG15c3RlcnkgaXMgYXJvdW5kIHRoZSB2ZXJzaW9uX2RhdGUg
KG9yIHNvIGl0IHdvdWxkIHNlZW0gdG8gYmUpIHBhcnQuDQoNClRoYXQncyB0aGUgY2F0YWxvZyB2
ZXJzaW9uLg0KWW91IGNhbid0IGdldCBpdCBmcm9tIHRoZSBjYXRhbG9ncyBBRkFJSywgYnV0DQp0
aGUgcGdfY29udHJvbGRhdGEgc2VydmVyIHV0aWxpdHkgd2lsbCBzaG93DQp0aGUgaW5mb3JtYXRp
b24uDQoNCklmIHlvdSByZWFsbHkgbmVlZCwgeW91IGNvdWxkIHdyYXAgdGhlIGV4ZWN1dGFibGUN
CmluIGEgUEwvUGVybFUgZnVuY3Rpb24uDQoNCllvdXJzLA0KTGF1cmVueiBBbGJlDQo=

Re: tablespace directories

От
Bèrto ëd Sèra
Дата:
Hi Laurenz

> That's the catalog version.
> You can't get it from the catalogs AFAIK, but
> the pg_controldata server utility will show
> the information.

Thanks! Much appreciated. I'm in a bash script, so it's fine.

Cheers
Bèrto

--
==============================
If Pac-Man had affected us as kids, we'd all be running around in a
darkened room munching pills and listening to repetitive music.