From: | Alexey Kondratov <a(dot)kondratov(at)postgrespro(dot)ru> |
---|---|
To: | Paul Guo <pguo(at)pivotal(dot)io> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Jimmy Yih <jyih(at)pivotal(dot)io>, Ashwin Agrawal <aagrawal(at)pivotal(dot)io> |
Subject: | Re: Two pg_rewind patches (auto generate recovery conf and ensure clean shutdown) |
Date: | 2019-09-30 08:51:25 |
Message-ID: | cc52a380-0c0e-0508-6114-8c985022d935@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 27.09.2019 17:28, Alvaro Herrera wrote:
>
>> + # Now, when pg_rewind apparently succeeded with minimal permissions,
>> + # add REPLICATION privilege. So we could test that new standby
>> + # is able to connect to the new master with generated config.
>> + $node_standby->psql(
>> + 'postgres', "ALTER ROLE rewind_user WITH REPLICATION;");
> I think this better use safe_psql.
>
Yes, indeed.
On 30.09.2019 10:07, Paul Guo wrote:
>
> 2) Are you going to leave -R option completely without tap-tests?
> Attached is a small patch, which tests -R option along with the
> existing
> 'remote' case. If needed it may be split into two separate cases.
> First,
> it tests that pg_rewind is able to succeed with minimal permissions
> according to the Michael's patch d9f543e [1]. Next, it checks
> presence
> of standby.signal and adds REPLICATION permission to rewind_user
> to test
> that new standby is able to start with generated recovery
> configuration.
>
> [1]
> https://github.com/postgres/postgres/commit/d9f543e9e9be15f92abdeaf870e57ef289020191
>
> It seems that we could further disabling recovery info setting code
> for the 'remote' test case?
>
> - my $port_standby = $node_standby->port;
> - $node_master->append_conf(
> - 'postgresql.conf', qq(
> -primary_conninfo='port=$port_standby'
> -));
> + if ($test_mode ne "remote")
> + {
> + my $port_standby = $node_standby->port;
> + $node_master->append_conf(
> + 'postgresql.conf',
> + qq(primary_conninfo='port=$port_standby'));
>
> - $node_master->set_standby_mode();
> + $node_master->set_standby_mode();
> + }
>
>
Yeah, it makes sense. It is excessive for remote if we add '-R' there.
I've updated and attached my test adding patch.
--
Alexey Kondratov
Postgres Professional https://www.postgrespro.com
Russian Postgres Company
Attachment | Content-Type | Size |
---|---|---|
v10-0003-Test-new-standby-start-with-generated-config-dur.patch | text/x-patch | 3.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2019-09-30 08:56:21 | Re: pgbench - allow to create partitioned tables |
Previous Message | Fujii Masao | 2019-09-30 08:50:03 | Re: recovery_min_apply_delay in archive recovery causes assertion failure in latch |