From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | masao(dot)fujii(at)oss(dot)nttdata(dot)com |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: A failure of standby to follow timeline switch |
Date: | 2021-01-07 07:32:36 |
Message-ID: | 20210107.163236.776031941315368203.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Thu, 7 Jan 2021 11:55:33 +0900, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote in
>
>
> On 2021/01/05 17:26, Kyotaro Horiguchi wrote:
> > At Mon, 4 Jan 2021 19:00:21 +0900, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
> > wrote in
> >>
> >>
> >> On 2021/01/04 12:06, Kyotaro Horiguchi wrote:
> >>> At Sat, 26 Dec 2020 02:15:06 +0900, Fujii Masao
> >>> <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote in
> >>>>
> >>>> On 2020/12/25 12:03, Kyotaro Horiguchi wrote:
> >>> The attached is the fixed version.
> >>
> >> Thanks for updating the patches!
> >>
> >>> In the first patch, the test added to 001_stream_rep.pl involves two
> >>> copied functions related to server-log investigation from
> >>> 019_repslot_limit.pl.
> >>
> >> So you're planning to define them commonly in TestLib.pm or elsewhere?
> > Yeah.. That's correct. Newly added as the first patch.
> > While making that change, I extended the interface of slurp_file to
> > allow reading from arbitrary position.
>
> Is this extension really helpful for current use case?
> At least I'd like to avoid back-patching this since it's an exntesion...
Yeah, I felt a hesitattion about it a bit. It's less useful assuming
that log files won't get so large. Removed in this version.
> OsFHandleOpen(my $fh = IO::Handle->new(), $fHandle, 'r')
> or croak "could not read \"$filename\": $^E\n";
> + seek($fh, $from, 0)
> + or croak "could not seek \"$filename\" to $from: $^E\n";
>
> I'm not familiar with this area, but SetFilePointer() is more suitable
> rather than seek()?
SetFilePointer() works for a native handle, IO::Handle->new()
here. seek() works on $fh, a perl handle. If ReadFile is used later
SetFilePointer() might be needed separately.
Anyway, it is removed.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
v4-0001-Move-TAP-log-searching-feature-to-common-modules.patch | text/x-patch | 3.5 KB |
v4-0002-New-test-for-timeline-tracking-of-walsender.patch | text/x-patch | 2.2 KB |
v4-0003-Fix-timeline-tracking-failure-while-sending-a-his.patch | text/x-patch | 1009 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2021-01-07 07:49:32 | Re: CheckpointLock needed in CreateCheckPoint()? |
Previous Message | Bharath Rupireddy | 2021-01-07 07:15:13 | Re: CheckpointLock needed in CreateCheckPoint()? |