RE: 001_rep_changes.pl fails due to publisher stuck on shutdown - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: 001_rep_changes.pl fails due to publisher stuck on shutdown
Date
Msg-id OSBPR01MB25528AAF9475328430569B47F5CF2@OSBPR01MB2552.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: 001_rep_changes.pl fails due to publisher stuck on shutdown  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: 001_rep_changes.pl fails due to publisher stuck on shutdown
Re: 001_rep_changes.pl fails due to publisher stuck on shutdown
List pgsql-hackers
Dear Horiguchi-san,

Thanks for sharing the patch! I agree this approach (ensure WAL records are flushed)
Is more proper than others.

I have an unclear point. According to the comment atop GetInsertRecPtr(), it just
returns the approximated value - the position of the last full WAL page [1].
If there is a continuation WAL record which across a page, will it return the
halfway point of the WAL record (end of the first WAL page)? If so, the proposed
fix seems not sufficient. We have to point out the exact the end of the record.

[1]:
/*
 * GetInsertRecPtr -- Returns the current insert position.
 *
 * NOTE: The value *actually* returned is the position of the last full
 * xlog page. It lags behind the real insert position by at most 1 page.
 * For that, we don't need to scan through WAL insertion locks, and an
 * approximation is enough for the current usage of this function.
 */
XLogRecPtr
GetInsertRecPtr(void)

Best Regards,
Hayato Kuroda
FUJITSU LIMITED
https://www.fujitsu.com/




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Inconsistency between try_mergejoin_path and create_mergejoin_plan
Next
From: Yugo NAGATA
Date:
Subject: Re: Document NULL