Re: multi-install PostgresNode fails with older postgres versions

From: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: multi-install PostgresNode fails with older postgres versions
Date: 2021-03-31 20:07:48
Message-ID: 3FCEE925-0E4F-4378-BD74-3F723CF230F6@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Mar 31, 2021, at 1:05 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>
> On 3/31/21 3:48 PM, Alvaro Herrera wrote:
>> On 2021-Mar-31, Mark Dilger wrote:
>>
>>> PostgresNode::start() doesn't work for servers older than version 10,
>>> either. If I hack that function to sleep until the postmaster.pid
>>> file exists, it works, but that is really ugly and is just to prove to
>>> myself that it is a timing issue. There were a few commits in the
>>> version 10 development cycle (cf, commit
>>> f13ea95f9e473a43ee4e1baeb94daaf83535d37c) which changed how pg_ctl
>>> works, though I haven't figured out yet exactly what the interaction
>>> with PostgresNode would be. I'll keep looking.
>> Do you need to do "pg_ctl -w" perhaps?
>
>
>
> Probably. The buildfarm does this unconditionally and has done for a
> very long time, so maybe we don't need a version test for it.

I put a version test for this and it works for me. I guess you could do it unconditionally, if you want, but the condition is just:

- TestLib::system_or_bail('pg_ctl', '-D', $pgdata, '-l', $logfile,
+ TestLib::system_or_bail('pg_ctl',
+ $self->older_than_version('10') ? '-w' : (),
+ '-D', $pgdata, '-l', $logfile,
'restart');


Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mats Kindahl 2021-03-31 20:10:22 RFC: Table access methods and scans
Previous Message Andrew Dunstan 2021-03-31 20:05:23 Re: multi-install PostgresNode fails with older postgres versions