Re: prevent immature WAL streaming - Mailing list pgsql-hackers

From Amul Sul
Subject Re: prevent immature WAL streaming
Date
Msg-id CAAJ_b94ATi4g_PFwrMn07HO=FYk-rgzU4UxyHHPwhN6FHq5u=A@mail.gmail.com
Whole thread Raw
In response to Re: prevent immature WAL streaming  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: prevent immature WAL streaming
List pgsql-hackers
On Mon, Oct 25, 2021 at 7:02 AM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
>
> At Fri, 22 Oct 2021 18:43:52 +0530, Amul Sul <sulamul@gmail.com> wrote in
> > Any thoughts about the patch posted previously?
>
> Honestly, xlogreader looks fine with the current shape. The reason is
> that it seems cleaner as an interface boundary since the caller of
> xlogreader doesn't need to know about the details of xlogreader. The
> current code nicely hides the end+1 confusion.
>
> Even if we want to get rid of global variables in xlog.c, I don't
> understand why we remove only abortedRecPtr. That change makes things
> more complex as a whole by letting xlog.c be more conscious of
> xlogreader's internals.  I'm not sure I like that aspect of the patch.
>

Because we have other ways to get abortedRecPtr without having a
global variable, but we don't have such a way for missingContrecPtr,
AFAICU.

I agree using global variables makes things a bit easier, but those
are inefficient when you want to share those with other processes --
that would add extra burden to shared memory.

Regards,
Amul



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Allow pg_signal_backend members to use pg_log_backend_memory_stats().
Next
From: Amit Kapila
Date:
Subject: Re: Added schema level support for publication.