Scanning pg_tablespace from walsender

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Scanning pg_tablespace from walsender
Дата
Msg-id AANLkTikZEXf_YJ0xXaz-00H0CwwPNpJ6tzb5=puoMzu_@mail.gmail.com
обсуждение исходный текст
Ответы Re: Scanning pg_tablespace from walsender  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Scanning pg_tablespace from walsender  (Robert Haas <robertmhaas@gmail.com>)
Re: Scanning pg_tablespace from walsender  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
I'm working on completing Heikki's patch for streaming base backups,
and have run into a problem:

In order to dump all tablespaces properly, I have to know where they
are (d'uh). In order to do that, I need to scan pg_tablespace.
However, scanning that from walsender gives me:

FATAL:  cannot read pg_class without having selected a database


Which means I somehow have to get pg_tablespace into the cache without
reading pg_class, I guess. Similar to how we do for pg_database for
example.

Can someone throw me a pointer or two on how to actually do that? :-)
Am I correct in assuming I need to add it to
RelationCacheInitializePhase2(), and to do that, need to figure out
how to define a TableSpaceRelation_Rowtype_Id in the headers? Or is
there an easier way I'm missing?

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: and it's not a bunny rabbit, either
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Scanning pg_tablespace from walsender