RE: archive status ".ready" files may be created too early - Mailing list pgsql-hackers

From matsumura.ryo@fujitsu.com
Subject RE: archive status ".ready" files may be created too early
Date
Msg-id OSAPR01MB50273079AB48BF5C8ADCED20E8790@OSAPR01MB5027.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: archive status ".ready" files may be created too early  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: archive status ".ready" files may be created too early  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Hello,

> At Mon, 13 Jul 2020 01:57:36 +0000, "Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>" wrote in
> Am I missing something here?

I write more detail(*).

  Record-A and Record-B are cross segment-border records.
  Record-A spans segment X and X+1.
  Record-B spans segment X+2 and X+3.
  If both records have been inserted to WAL buffer, lastSegContRecStart/End points to Record-B
* If a writer flushes segment X and a part of X+1 but record-A is not flushed completely,
  NotifyStableSegments() allows the writer to notify segment-X.

Then, Record-A may be invalidated by crash-recovery and overwritten by new WAL record.
The segment-X is not same as the archived one.

Regard
Ryo Matsumura



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: Stale external URL in doc?
Next
From: Amit Kapila
Date:
Subject: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions