[HACKERS] Scanning pg_tablespace from walsender

2011-01-03 Thread Magnus Hagander
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

Re: [HACKERS] Scanning pg_tablespace from walsender

2011-01-03 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: 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. Wait a minute.

Re: [HACKERS] Scanning pg_tablespace from walsender

2011-01-03 Thread Robert Haas
On Mon, Jan 3, 2011 at 10:25 AM, Magnus Hagander mag...@hagander.net wrote: 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). Can you get that directly from the

Re: [HACKERS] Scanning pg_tablespace from walsender

2011-01-03 Thread Magnus Hagander
On Mon, Jan 3, 2011 at 16:29, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: 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

Re: [HACKERS] Scanning pg_tablespace from walsender

2011-01-03 Thread Magnus Hagander
On Mon, Jan 3, 2011 at 16:34, Robert Haas robertmh...@gmail.com wrote: On Mon, Jan 3, 2011 at 10:25 AM, Magnus Hagander mag...@hagander.net wrote: 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

Re: [HACKERS] Scanning pg_tablespace from walsender

2011-01-03 Thread Robert Haas
On Mon, Jan 3, 2011 at 10:37 AM, Magnus Hagander mag...@hagander.net wrote: On Mon, Jan 3, 2011 at 16:34, Robert Haas robertmh...@gmail.com wrote: On Mon, Jan 3, 2011 at 10:25 AM, Magnus Hagander mag...@hagander.net wrote: I'm working on completing Heikki's patch for streaming base backups,

Re: [HACKERS] Scanning pg_tablespace from walsender

2011-01-03 Thread Magnus Hagander
On Mon, Jan 3, 2011 at 16:40, Robert Haas robertmh...@gmail.com wrote: On Mon, Jan 3, 2011 at 10:37 AM, Magnus Hagander mag...@hagander.net wrote: On Mon, Jan 3, 2011 at 16:34, Robert Haas robertmh...@gmail.com wrote: On Mon, Jan 3, 2011 at 10:25 AM, Magnus Hagander mag...@hagander.net wrote:

Re: [HACKERS] Scanning pg_tablespace from walsender

2011-01-03 Thread Alvaro Herrera
Excerpts from Magnus Hagander's message of lun ene 03 12:25:28 -0300 2011: 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

Re: [HACKERS] Scanning pg_tablespace from walsender

2011-01-03 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Mon, Jan 3, 2011 at 16:29, Tom Lane t...@sss.pgh.pa.us wrote: Wait a minute.  Isn't this problem about to metastasize into I need to read *every* global catalog from walsender?  If not, why not?  If so, I think we need another answer. Um, why

Re: [HACKERS] Scanning pg_tablespace from walsender

2011-01-03 Thread Robert Haas
On Mon, Jan 3, 2011 at 10:42 AM, Magnus Hagander mag...@hagander.net wrote: Well, they need to be put back in the same location on the other machine (slave in case of replication, tarball otherwise). If I just traverse the symlinks, they'll just appears as a subdirectory of pg_tblspc on the

Re: [HACKERS] Scanning pg_tablespace from walsender

2011-01-03 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Jan 3, 2011 at 10:42 AM, Magnus Hagander mag...@hagander.net wrote: Well, they need to be put back in the same location on the other machine (slave in case of replication, tarball otherwise). If I just traverse the symlinks, they'll just

Re: [HACKERS] Scanning pg_tablespace from walsender

2011-01-03 Thread Magnus Hagander
On Mon, Jan 3, 2011 at 17:14, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Jan 3, 2011 at 10:42 AM, Magnus Hagander mag...@hagander.net wrote: Well, they need to be put back in the same location on the other machine (slave in case of replication, tarball

Re: [HACKERS] Scanning pg_tablespace from walsender

2011-01-03 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: On Mon, Jan 3, 2011 at 10:42 AM, Magnus Hagander mag...@hagander.net wrote: Well, they need to be put back in the same location on the other machine (slave in case of replication, tarball otherwise). If I just traverse the symlinks, they'll just

Re: [HACKERS] Scanning pg_tablespace from walsender

2011-01-03 Thread Magnus Hagander
On Mon, Jan 3, 2011 at 17:17, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: On Mon, Jan 3, 2011 at 10:42 AM, Magnus Hagander mag...@hagander.net wrote: Well, they need to be put back in the same location on the other machine (slave in case of

Re: [HACKERS] Scanning pg_tablespace from walsender

2011-01-03 Thread Stephen Frost
* Magnus Hagander (mag...@hagander.net) wrote: It's already a basic requirement that they need to be the same - replicating over a CREATE TABLESPACE is going to fail otherwise.. Being able to deal with that in a nice way would be good, of course, but we don't have that today. If CREATE