Re: xlog.c: removing ReadRecPtr and EndRecPtr - Mailing list pgsql-hackers

From Tom Lane
Subject Re: xlog.c: removing ReadRecPtr and EndRecPtr
Date
Msg-id 2971949.1637266481@sss.pgh.pa.us
Whole thread Raw
In response to Re: xlog.c: removing ReadRecPtr and EndRecPtr  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: xlog.c: removing ReadRecPtr and EndRecPtr
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> There's a second place where the patch needs to wait for something
> also, and that one I've crudely kludged with sleep(10). If anybody
> around here who is good at figuring out how to write clever TAP tests
> can tell me how to fix this test to be non-stupid, I will happily do
> so.

As far as that goes, if you conceptualize it as "wait for this text
to appear in the log file", there's prior art in existing TAP tests.
Basically, sleep for some reasonable short period and check the
log file; if not there, repeat until timeout.

I'm a little dubious that this test case is valuable enough to
mess around with a nonstandard postmaster startup protocol, though.
The main reason I dislike that idea is that any fixes we apply to
the TAP tests' normal postmaster-startup code would almost inevitably
miss fixing this test.  IIRC there have been security-related fixes in
that area (e.g. where do we put the postmaster's socket), so I find
that prospect pretty scary.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: xlog.c: removing ReadRecPtr and EndRecPtr
Next
From: Tom Lane
Date:
Subject: Re: Should rename "startup process" to something else?