Add tablespace tap test to pg_rewind - Mailing list pgsql-hackers

From Shaoqi Bai
Subject Add tablespace tap test to pg_rewind
Date
Msg-id CAGRcZQXA-4hrCQy1xOAJ7WwBpEWEJJvgAU2dsNQr13C+6J8izQ@mail.gmail.com
Whole thread Raw
Responses Fwd: Add tablespace tap test to pg_rewind
List pgsql-hackers
Hi hackers,

There is already a databases tap tests in pg_rewind, wonder if there is a need for tablespace tap tests in pg_rewind. 
Attached is a initial patch from me.

Here is a patch for runing pg_rewind,  it is very similar to src/bin/pg_rewind/t/002_databases.pl, but there is no master_psql("CREATE TABLESPACE beforepromotion LOCATION '$tempdir/beforepromotion'"); after create_standby() and before promote_standby(), because pg_rewind will error out :
could not create directory "/Users/sbai/work/postgres/src/bin/pg_rewind/tmp_check/t_006_tablespace_master_local_data/pgdata/pg_tblspc/24576/PG_12_201903063": File exists
Failure, exiting

The patch is created on top of the 
commit e1e0e8d58c5c70da92e36cb9d59c2f7ecf839e00 (origin/master, origin/HEAD)
Author: Michael Paquier <michael@paquier.xyz>
Date:   Fri Mar 8 15:10:14 2019 +0900

    Fix function signatures of pageinspect in documentation

    tuple_data_split() lacked the type of the first argument, and
    heap_page_item_attrs() has reversed the first and second argument,
    with the bytea argument using an incorrect name.

    Author: Laurenz Albe
    Backpatch-through: 9.6

Attachment

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Making all nbtree entries unique by having heap TIDs participatein comparisons
Next
From: David Rowley
Date:
Subject: Re: Update does not move row across foreign partitions in v11