Re: Fwd: Add tablespace tap test to pg_rewind

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Shaoqi Bai <sbai(at)pivotal(dot)io>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Fwd: Add tablespace tap test to pg_rewind
Date: 2019-03-10 22:50:17
Message-ID: 20190310225017.GB1818@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Mar 09, 2019 at 09:09:24AM +0900, Michael Paquier wrote:
> When working on the first version of pg_rewind for VMware with Heikki,
> tablespace support has been added only after, so what you propose is
> sensible I think.
>
> +# Run the test in both modes.
> +run_test('local');
> Small nit: we should test for the remote mode here as well.

I got to think more about this one a bit more, and I think that it
would be good to also check the consistency of a tablespace created
before promotion. If you copy the logic from 002_databases.pl, this
is not going to work because the primary and the standby would try to
create the tablespace in the same path, stepping on each other's
toes. So what you need to do is to create the tablespace on the
primary because creating the standby. This requires a bit more work
than what you propose here though as you basically need to extend
RewindTest::create_standby so as it is possible to pass extra
arguments to $node_master->backup. And in this case the extra option
to use is --tablespace-mapping to make sure that the primary and the
standby have the same tablespace, but defined on different paths.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dagfinn Ilmari Mannsåker 2019-03-10 23:07:53 Re: what makes the PL cursor life-cycle must be in the same transaction?
Previous Message Michael Paquier 2019-03-10 22:42:20 Re: Add missing CREATE TABLE IF NOT EXISTS table_name AS EXECUTE query;