Re: xlog.c: removing ReadRecPtr and EndRecPtr

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amul Sul <sulamul(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: xlog.c: removing ReadRecPtr and EndRecPtr
Date: 2021-11-18 19:13:18
Message-ID: CA+TgmoakD0rkC7EU9uV363y2E-HrbpU8biPqOvJt3iExxZTSaQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 18, 2021 at 7:30 AM Amul Sul <sulamul(at)gmail(dot)com> wrote:
> Somehow with and without patch I am getting the same log.

Try applying the attached 0001-dubious-test-cast.patch for you and see
if that fails. It does for me. If so, then try applying
0002-fix-the-bug.patch and see if that makes it pass.

Unfortunately, this test case isn't remotely committable as-is, and I
don't know how to make it so. The main problem is that, although you
can start up a server with nothing in pg_wal, no restore_command, and
no archive command, pg_ctl will not believe that it has started. I
worked around that problem by telling pg_ctl to ignore failures, but
it still waits for a long time before timing out, which sucks both
because (1) hackers are impatient and (2) some hackers run extremely
slow buildfarm machines where almost any timeout won't be long enough.
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.

Otherwise, I think I will just need to commit and back-patch the
actual bug fix without a test, and then rebase the rest of the patch I
posted previously over top of those changes for master only.

--
Robert Haas
EDB: http://www.enterprisedb.com

Attachment Content-Type Size
0001-dubious-test-case.patch application/octet-stream 2.7 KB
0002-fix-the-bug.patch application/octet-stream 4.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2021-11-18 19:21:09 Re: xlog.c: removing ReadRecPtr and EndRecPtr
Previous Message Alvaro Herrera 2021-11-18 19:11:52 Re: Should rename "startup process" to something else?