• Tom Lane's avatar
    Improve logrotate test so that it meaningfully exercises syslogger. · 9d5c22d2
    Tom Lane authored
    Discussion of bug #15804 reveals that this test didn't really prove
    that the syslogger child process ever launched successfully, much
    less did anything.  It was only checking that the expected log file
    gets created, and that's done in the postmaster.  Moreover, the
    test assumed it could rename the log file, which is likely to fail
    on Windows (cf. commit d611175e).
    
    Instead, use the default log file name pattern, which should result
    in a new file name being chosen after 1 second, and verify that
    rotation has occurred by checking for a new file name.  Also add code
    to test that messages actually do propagate through the syslogger.
    
    In theory this version of the test should work on Windows, so
    revert d611175e.
    
    Discussion: https://postgr.es/m/15804-3721117bf40fb654@postgresql.org
    9d5c22d2
004_logrotate.pl 2.15 KB