Nope... that didn't work.
After I had recreated the empty database on the second server, I noticed that the directory names that were present at the root of that fs I set up for the tablespace were not the same:
When I just mounted the FS on the second server (before deleting everything so that I could recreate the tablespace/database):
Code:
$ sudo ls -l /var/lib/postgresql/sanos/
total 8
drwx------ 2 postgres postgres 4096 2012-11-01 16:04 16388
-rw------- 1 postgres postgres 4 2012-11-01 15:39 PG_VERSION
Then I deleted everything and proceeded to create the tablespace/database:
Code:
$ sudo ls -l /var/lib/postgresql/sanos/
total 8
drwx------ 2 postgres postgres 4096 2012-11-01 16:22 16386
-rw------- 1 postgres postgres 4 2012-11-01 16:22 PG_VERSION
16388 vs 16386. Anyway, I shutdown postgres on the second server, umounted. Mounted on the first server, started postgres on the first server.
Code:
$ sudo /etc/init.d/postgresql-8.4 start
* Starting PostgreSQL 8.4 database server [ OK ]
$ sudo -u postgres psql sanos
psql: FATAL: database "sanos" does not exist
DETAIL: The database subdirectory "pg_tblspc/16387/16388" is missing.
End of story.