From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> |
Subject: | Re: pg_upgrade test failure |
Date: | 2023-01-31 20:54:42 |
Message-ID: | CA+hUKGKCVy2=o=d8c2Va6a_3Rpf_KkhUitkWCZ3hzuO2VwLMXA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On Wed, Feb 1, 2023 at 6:28 AM Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
> > I pushed the rmtree() change. Let's see if that helps, or tells us
> > something new.
>
> I found a few failures since then:
>
> https://api.cirrus-ci.com/v1/artifact/task/6696942420361216/testrun/build/testrun/pg_upgrade/002_pg_upgrade/log/regress_log_002_pg_upgrade
>
> pg_upgrade: warning: could not remove directory "C:/cirrus/build/testrun/pg_upgrade/002_pg_upgrade/data/t_002_pg_upgrade_new_node_data/pgdata/pg_upgrade_output.d/20230131T134931.720/log": Directory not empty
> pg_upgrade: warning: could not remove directory "C:/cirrus/build/testrun/pg_upgrade/002_pg_upgrade/data/t_002_pg_upgrade_new_node_data/pgdata/pg_upgrade_output.d/20230131T134931.720": Directory not empty
So no change: we didn't see "could not unlink file ...". So I think
that means that it was rmtree() that unlinked the file for the *first*
time, but someone else has it open.
Even though Windows is at this point eroding my love of computers and
making me consider a new career in, I dunno, carrot farming or
something, I have one more idea. Check out this kluge in
src/bin/pg_upgrade/exec.c:
/*
* "pg_ctl -w stop" might have reported that the server has stopped
* because the postmaster.pid file has been removed, but "pg_ctl -w
* start" might still be in the process of closing and might still be
* holding its stdout and -l log file descriptors open. Therefore,
* try to open the log file a few more times.
*/
I'm not sure about anything, but if that's what's happening here, then
maybe the attached would help. In short, it would make the previous
theory true (the idea of a second unlink() saving the day).
Attachment | Content-Type | Size |
---|---|---|
x.patch | text/x-patch | 983 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2023-01-31 21:04:24 | Re: pg_upgrade test failure |
Previous Message | Tom Lane | 2023-01-31 19:33:53 | pgsql: Doc: clarify use of NULL to drop comments and security labels. |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2023-01-31 21:04:24 | Re: pg_upgrade test failure |
Previous Message | Tom Lane | 2023-01-31 20:36:20 | Re: heapgettup() with NoMovementScanDirection unused in core? |