pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Nathan Bossart <nathandbossart@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Magnus Hagander <magnus@hagander.net>
Subject: Re: pgsql: Add 'basebackup_to_shell' contrib module.
Date: Wed, 30 Mar 2022 19:17:17 -0700
Message-ID: <20220331021717.xusjlknpbs7szyv6@alap3.anarazel.de> (raw)
In-Reply-To: <485495.1648692468@sss.pgh.pa.us>
References: <CA+TgmoYf9wE56eAc5x8g33ta1GbNEAN4CcvdhDNs+Rg4OfzaHQ@mail.gmail.com>
	<20220330163024.fsbpbxwxh5oo2ktx@alap3.anarazel.de>
	<CA+TgmoaZ6L37kVJPRDavbtRa+wq-vtBkd3L9s=B7d91BF-UW4Q@mail.gmail.com>
	<20220330165450.3lruwky7eveddsvq@alap3.anarazel.de>
	<CA+TgmobK9EEyPpVuBs7UL_1wHkgAbFdnAkrFox6h_0-5i7HM2A@mail.gmail.com>
	<285252.1648671723@sss.pgh.pa.us>
	<CA+TgmoYgrjwh8SVPG_hiq1U4=bxj5MaR_RQ+abvO7izm94rEXQ@mail.gmail.com>
	<20220330223531.GA134543@nathanxps13>
	<472639.1648684865@sss.pgh.pa.us>
	<485495.1648692468@sss.pgh.pa.us>

Hi,

On 2022-03-30 22:07:48 -0400, Tom Lane wrote:
> So ... none of the Windows buildfarm members actually like this
> test script.  They're all showing failures along the lines of
> 
> not ok 2 - fails if basebackup_to_shell.command is not set: matches
> 
> #   Failed test 'fails if basebackup_to_shell.command is not set: matches'
> #   at t/001_basic.pl line 38.
> #                   'pg_basebackup: error: connection to server at "127.0.0.1", port 55358 failed: FATAL:  SSPI authentication failed for user "backupuser"
> # '
> #     doesn't match '(?^:shell command for backup is not configured)'
> 
> Does the CI setup not account for this issue?

On windows CI sets
    # Avoids port conflicts between concurrent tap test runs
    PG_TEST_USE_UNIX_SOCKETS: 1

because I've otherwise seen a lot of spurious tap test failures - Cluster.pm
get_free_port() is racy, as it admits:
XXX A port available now may become unavailable by the time we start
the desired service.

The only alternative is to not use parallelism when running tap tests, but
that makes test runs even slower - and windows is already the bottleneck for
cfbot.

I assume SSPI doesn't work over unix sockets? Oh. Maybe it's not even that -
we only enable it when not using unix sockets:

# Internal method to set up trusted pg_hba.conf for replication.  Not
# documented because you shouldn't use it, it's called automatically if needed.
sub set_replication_conf
{
	my ($self) = @_;
	my $pgdata = $self->data_dir;

	$self->host eq $test_pghost
	  or croak "set_replication_conf only works with the default host";

	open my $hba, '>>', "$pgdata/pg_hba.conf";
	print $hba "\n# Allow replication (set up by PostgreSQL::Test::Cluster.pm)\n";
	if ($PostgreSQL::Test::Utils::windows_os && !$PostgreSQL::Test::Utils::use_unix_sockets)
	{
		print $hba
		  "host replication all $test_localhost/32 sspi include_realm=1 map=regress\n";
	}
	close $hba;
	return;
}

Greetings,

Andres Freund





view thread (66+ messages)  latest in thread

Message-ID: <20220331021717.xusjlknpbs7szyv6@alap3.anarazel.de>
Permalink:  ../20220331021717.xusjlknpbs7szyv6@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20220331021717.xusjlknpbs7szyv6@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, nathandbossart@gmail.com, andrew@dunslane.net, thomas.munro@gmail.com, pgsql-hackers@lists.postgresql.org, magnus@hagander.net
  Subject: Re: pgsql: Add 'basebackup_to_shell' contrib module.
  In-Reply-To: <20220331021717.xusjlknpbs7szyv6@alap3.anarazel.de>
  References: <CA+TgmoYf9wE56eAc5x8g33ta1GbNEAN4CcvdhDNs+Rg4OfzaHQ@mail.gmail.com> <20220330163024.fsbpbxwxh5oo2ktx@alap3.anarazel.de> <CA+TgmoaZ6L37kVJPRDavbtRa+wq-vtBkd3L9s=B7d91BF-UW4Q@mail.gmail.com> <20220330165450.3lruwky7eveddsvq@alap3.anarazel.de> <CA+TgmobK9EEyPpVuBs7UL_1wHkgAbFdnAkrFox6h_0-5i7HM2A@mail.gmail.com> <285252.1648671723@sss.pgh.pa.us> <CA+TgmoYgrjwh8SVPG_hiq1U4=bxj5MaR_RQ+abvO7izm94rEXQ@mail.gmail.com> <20220330223531.GA134543@nathanxps13> <472639.1648684865@sss.pgh.pa.us> <485495.1648692468@sss.pgh.pa.us> <20220331021717.xusjlknpbs7szyv6@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox