Re: Making background psql nicer to use in tap tests

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Making background psql nicer to use in tap tests
Дата
Msg-id 20230317225855.v6a43tnham47uwyn@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: Making background psql nicer to use in tap tests  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Making background psql nicer to use in tap tests  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Hi,

On 2023-03-17 12:25:14 -0400, Andrew Dunstan wrote:
> On 2023-03-17 Fr 10:08, Daniel Gustafsson wrote:
> > > If we are going to keep this as a separate package, then we should put some code in the constructor to prevent it
beingcalled from elsewhere than the Cluster package. e.g.
 
> > > 
> > >      # this constructor should only be called from PostgreSQL::Test::Cluster
> > >      my ($package, $file, $line) = caller;
> > >      die "Forbidden caller of constructor: package: $package, file: $file:$line"
> > >        unless $package eq 'PostgreSQL::Test::Cluster';
> > I don't have strong feelings about where to place this, but Cluster.pm is
> > already quite long so I see a small upside to keeping it separate to not make
> > that worse.
> > 
> 
> Yeah, I can go along with that.

Cool - I'd prefer a separate file. I do find Cluster.pm somewhat unwieldy at
this point, and I susect that we'll end up with additional helpers around
BackgroundPsql.

Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Add n_tup_newpage_upd to pg_stat table views
Следующее
От: Andres Freund
Дата:
Сообщение: Should we remove vacuum_defer_cleanup_age?