Re: Add test of pg_prewarm extenion

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Dong Wook Lee <sh95119(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Justin Pryzby <pryzby(at)telsasoft(dot)com>
Subject: Re: Add test of pg_prewarm extenion
Date: 2022-08-01 09:55:40
Message-ID: CAOBaU_bhZuUQ1TZW4iRdxepbpaxrvsQnwXS87ZZN0FFCQkhK8w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 1, 2022 at 5:16 PM Dong Wook Lee <sh95119(at)gmail(dot)com> wrote:
>
> > Keep in mind also that the logfile accumulates over stops and
> > restarts. As you've coded this test, you don't know which DB start
> > emitted the matching line, so the test proves a lot less than it
> > ought to.
> >
> > I wonder also about race conditions. On fast machines, or those
> > with weird schedulers, the test script might reach slurp_file
> > before autoprewarm has had a chance to emit the log entry you want.
>
> I have no idea how to deal with race conditions.
> Does anybody know how to deal with this?

Couldn't you use $node->wait_for_log() instead?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2022-08-01 10:24:33 Question about user/database-level parameters
Previous Message Richard Guo 2022-08-01 09:28:45 Re: Typo in pg_db_role_setting.h