Re: In-core regression tests for replication, cascading, archiving, PITR, etc. Michael Paquier

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: In-core regression tests for replication, cascading, archiving, PITR, etc. Michael Paquier
Дата
Msg-id 52CBC4E6.40804@vmware.com
обсуждение исходный текст
Ответ на Re: In-core regression tests for replication, cascading, archiving, PITR, etc. Michael Paquier  (Mark Dilger <markdilger@yahoo.com>)
Ответы Re: In-core regression tests for replication, cascading, archiving, PITR, etc. Michael Paquier  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 01/06/2014 07:12 PM, Mark Dilger wrote:
> The reason I was going to all the trouble of creating
> chrooted environments was to be able to replicate
> clusters that have tablespaces.

You can remove and recreate the symlink in pg_tblspc directory, after 
creating the cluster, to point it to a different location. It might be a 
bit tricky to do that if you have two clusters running at the same time, 
but it's probably easier than chrooting anyway. For example:

1. stop the standby
2. create the tablespace in master
3. stop master
4. mv the tablespace directory, and modify the symlink in master to 
point to the new location
5. start standby. It will replay the tablespace creation in the original 
location
6. restart master.

You now have the same tablespace in master and standby, but they point 
to different locations. This doesn't allow dynamically creating and 
dropping tablespaces during tests, but at least it gives you one 
tablespace to use.

Another idea would be to do something like chroot, but more lightweight, 
using FUSE, private mount namespaces, or cgroups.

- Heikki



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: ERROR: missing chunk number 0 for toast value
Следующее
От: Dan Ports
Дата:
Сообщение: Re: Re: How to reproduce serialization failure for a read only transaction.