From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> |
Cc: | Thomas Kellerer <shammat(at)gmx(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Is this a bug in pg_current_logfile() on Windows? |
Date: | 2020-07-09 02:40:42 |
Message-ID: | 1777519.1594262442@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
I wrote:
> Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> writes:
>> Seems reasonable. If we rip it out completely we'll have to find all the
>> places it breaks and fix them. And we'll almost certainly get new
>> breakage. If it's hiding a real bug we'll have to do that, but I'd be
>> reluctant unless there's actual proof.
> Hard to tell. What I propose to do right now is change the \r filters
> as shown above, and see if the test I added in 004_logrotate.pl starts
> to show failures on Windows. If it does, and no other place does,
> I'm willing to be satisfied with that. If we see *other* failures then
> that'd prove that the problem is real, no?
So I did that, and the first report is from bowerbird and it's still
green. Unless I'm completely misinterpreting what's happening (always
a possibility), that means we're still managing to remove "data"
occurrences of \r.
The most likely theory about that, I think, is that IPC::Run::run already
translated any \r\n occurrences in the psql command's output to plain \n.
Then, the \r generated by pg_current_logfile() would butt up against the
line-ending \n, allowing the "fix" in sub psql to remove valid data.
One thing I noticed while making 91bdf499b is that some of these
substitutions are conditioned on "if $TestLib::windows_os" while others
are conditioned on "if $Config{osname} eq 'msys'". What is the reason
for this difference? Is it possible that we only really need to do it
in the latter case?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Brajendra Pratap Singh | 2020-07-09 07:05:05 | Kerberos-Postgresql implementation for user authentication |
Previous Message | Tom Lane | 2020-07-08 23:29:57 | Re: Is this a bug in pg_current_logfile() on Windows? |
From | Date | Subject | |
---|---|---|---|
Next Message | Ajin Cherian | 2020-07-09 02:48:17 | Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions |
Previous Message | osumi.takamichi@fujitsu.com | 2020-07-09 02:36:36 | Implement UNLOGGED clause for COPY FROM |