From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix RecursiveCopy.pm to cope with disappearing files. |
Date: | 2017-09-12 02:03:15 |
Message-ID: | E1draXj-0007Zj-TY@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix RecursiveCopy.pm to cope with disappearing files.
When copying from an active database tree, it's possible for files to be
deleted after we see them in a readdir() scan but before we can open them.
(Once we've got a file open, we don't expect any further errors from it
getting unlinked, though.) Tweak RecursiveCopy so it can cope with this
case, so as to avoid irreproducible test failures.
Back-patch to 9.6 where this code was added. In v10 and HEAD, also
remove unused "use RecursiveCopy" in one recovery test script.
Michael Paquier and Tom Lane
Discussion: https://postgr.es/m/24621.1504924323@sss.pgh.pa.us
Branch
------
REL_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/bd18960cb93f3b6e9f43f3cabec34f1929f05ec3
Modified Files
--------------
src/test/perl/RecursiveCopy.pm | 64 +++++++++++++++-------
.../recovery/t/010_logical_decoding_timelines.pl | 1 -
2 files changed, 45 insertions(+), 20 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Meskes | 2017-09-12 02:53:57 | pgsql: Fixed ECPG to correctly handle out-of-scope cursor declarations |
Previous Message | Tom Lane | 2017-09-12 01:32:43 | Re: pgsql: Changed order of statements and added an additiona MSVC safeguar |