Re: Add test of pg_prewarm extenion

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

2022년 8월 1일 (월) 오후 11:33, Dong Wook Lee <sh95119(at)gmail(dot)com>님이 작성:
>
> Thank you for letting me know.
> I edited my patch with `wait_for_log()`.
>
> 2022년 8월 1일 (월) 오후 6:55, Julien Rouhaud <rjuju123(at)gmail(dot)com>님이 작성:
> >
> > 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?

Please forgive my carelessness.
After trimming the code a little more, I sent the patch again.

Attachment Content-Type Size
v4_add_test_pg_prewarm.patch application/octet-stream 2.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2022-08-01 15:30:30 Re: support for MERGE
Previous Message Justin Pryzby 2022-08-01 14:52:57 Re: support for MERGE