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

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Mark Dilger <markdilger(at)yahoo(dot)com>
Cc: Greg Stark <stark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: In-core regression tests for replication, cascading, archiving, PITR, etc. Michael Paquier
Date: 2014-01-07 09:12:06
Message-ID: 52CBC4E6.40804@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dan Ports 2014-01-07 10:30:54 Re: Re: How to reproduce serialization failure for a read only transaction.
Previous Message Heikki Linnakangas 2014-01-07 08:45:24 Re: ERROR: missing chunk number 0 for toast value