Re: prevent immature WAL streaming

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: masao(dot)fujii(at)oss(dot)nttdata(dot)com, andres(at)anarazel(dot)de, pgsql-hackers(at)lists(dot)postgresql(dot)org, bossartn(at)amazon(dot)com, mengjuan(dot)cmj(at)alibaba-inc(dot)com, Jakub(dot)Wartak(at)tomtom(dot)com
Subject: Re: prevent immature WAL streaming
Date: 2021-09-02 22:43:33
Message-ID: 202109022243.wo4heqonwybo@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-Sep-02, Kyotaro Horiguchi wrote:

> So, this is a crude PoC of that.

I had ended up with something very similar, except I was trying to cram
the flag via the checkpoint record instead of hacking
AdvanceXLInsertBuffer(). I removed that stuff and merged both, here's
the result.

> 1. This patch is written on the current master, but it doesn't
> interfare with the seg-boundary-memorize patch since it removes the
> calls to RegisterSegmentBoundary.

I rebased on top of the revert patch.

> 2. Since xlogreader cannot emit a log-message immediately, we don't
> have a means to leave a log message to inform recovery met an
> aborted partial continuation record. (In this PoC, it is done by
> fprintf:p)

Shrug. We can just use an #ifndef FRONTEND / elog(LOG). (I didn't keep
this part, sorry.)

> 3. Myebe we need to pg_waldump to show partial continuation records,
> but I'm not sure how to realize that.

Ah yes, we'll need to fix that.

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"Las navajas y los monos deben estar siempre distantes" (Germán Poo)

Attachment Content-Type Size
v2-0001-Revert-Avoid-creating-archive-status-.ready-files.patch text/x-diff 17.2 KB
v2-0002-Implement-FIRST_IS_ABORTED_CONTRECORD.patch text/x-diff 7.7 KB
v2-0003-debugging-changes.patch text/x-diff 2.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Phil Krylov 2021-09-02 22:57:16 Re: [PATCH] pg_ctl should not truncate command lines at 1024 characters
Previous Message Ranier Vilela 2021-09-02 22:36:08 Re: [PATCH] pg_ctl should not truncate command lines at 1024 characters