From: | Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Dipesh Pandit <dipesh(dot)pandit(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: multithreaded zstd backup compression for client and server |
Date: | 2022-03-30 12:06:37 |
Message-ID: | 8735izr6eq.fsf@wibble.ilmari.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Mon, Mar 28, 2022 at 12:52 PM Dagfinn Ilmari Mannsåker
> <ilmari(at)ilmari(dot)org> wrote:
>> > True, but that also means it shows up in the actual failure message,
>> > which seems too verbose. By just using 'print', it ends up in the log
>> > file if it's needed, but not anywhere else. Maybe there's a better way
>> > to do this, but I don't think using note() is what I want.
>>
>> That is the difference between note() and diag(): note() prints to
>> stdout so is not visible under a non-verbose prove run, while diag()
>> prints to stderr so it's always visible.
>
> OK, but print doesn't do either of those things. The output only shows
> up in the log file, even with --verbose. Here's an example of what the
> log file looks like:
>
> # Running: pg_verifybackup -n -m
> /Users/rhaas/pgsql/src/bin/pg_verifybackup/tmp_check/t_008_untar_primary_data/backup/server-backup/backup_manifest
> -e /Users/rhaas/pgsql/src/bin/pg_verifybackup/tmp_check/t_008_untar_primary_data/backup/extracted-backup
> backup successfully verified
> ok 6 - verify backup, compression gzip
>
> As you can see, there is a line here that does not begin with #. That
> line is the standard output of a command that was run by the test
> script.
Oh, that must be some non-standard output handling that our test setup
does. Plain `prove` shows everything on stdout and stderr in verbose
mode, and only stderr in non-vebose mode:
$ cat verbosity.t
use strict;
use warnings;
use Test::More;
pass "pass";
diag "diag";
note "note";
print "print\n";
system qw(echo system);
done_testing;
$ prove verbosity.t
verbosity.t .. 1/? # diag
verbosity.t .. ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.04 cusr 0.01 csys = 0.07 CPU)
Result: PASS
$ prove -v verbosity.t
verbosity.t ..
ok 1 - pass
# diag
# note
print
system
1..1
ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.06 cusr 0.00 csys = 0.08 CPU)
Result: PASS
- ilmari
From | Date | Subject | |
---|---|---|---|
Next Message | Bharath Rupireddy | 2022-03-30 12:07:30 | Re: Identify missing publications from publisher while create/alter subscription. |
Previous Message | Tomas Vondra | 2022-03-30 12:01:38 | Re: Column Filtering in Logical Replication |