Alvaro Herrera <alvhe...@2ndquadrant.com> writes: > Tom Lane wrote: >> Michael Paquier <michael.paqu...@gmail.com> writes: >>> Well, it showed up on my terminal...
>> Not on mine, as per the extract I showed. Probably a Perl version >> difference, but I don't think we can exactly write off RHEL6 as an >> uninteresting obsolete distribution. (The Perl here is 5.10.1.) > Hmm, maybe a selinux policy or something like that is preventing some > system call from working, Good thought, but overcomplicated. After some quality time with strace, I find that the Undefined subroutine &TestLib::run called at /home/postgres/pgsql/src/bin/initdb /../../../src/test/perl/TestLib.pm line 146. error message does indeed appear, but it's printed only into src/bin/initdb/tmp_check/log/regress_log_001_initdb It appears that the reason this happens is that the child perl process (of the two that are active in this area of the trace) decides at one point along the line to redirect its own stdout and stderr into that file, disconnecting them from the pipes leading to the parent process. So when that process prints "Undefined subroutine" to its stderr, that is where it goes. I suppose that the redirection is a result of this bit in TestLib.pm: # Hijack STDOUT and STDERR to the log file open(ORIG_STDOUT, ">&STDOUT"); open(ORIG_STDERR, ">&STDERR"); open(STDOUT, ">&TESTLOG"); open(STDERR, ">&TESTLOG"); so the question from my end is not so much why it doesn't work for me as how it could possibly work for you. Could the newer Perl version be detecting the undefined-subroutine error before it executes the file's INIT stanza, rather than after? Or maybe the "tie" stuff happening just below this acts differently in more modern Perls? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers