From: | "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: pg_dump - how to force to show timestamps in client log |
Date: | 2020-11-21 11:07:05 |
Message-ID: | 20201121110705.GA19224@hjp.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 2020-11-20 19:01:47 +0100, Durumdara wrote:
> We need to log the pg_dump's state.
> What objects are in copy, and what are the starting and ending times.
>
> But when I try to redirect the output, the result doesn't have timestamps.
>
> PG 11, on Windows.
>
> As I see the -v option isn't enough to see the starting times.
>
> For example:
>
> 2020-11-19 12:00:01.084 Dump table content table1
> 2020-11-19 12:03:12.932 Dump table content table2
You can pipe the output through a timestamping tool like this:
pg_dump --compress=5 -v -Fd -f "$name.$$" $db 2>&1 | ts > log/"$name".$(isodate).log
ts is available here: https://github.com/hjp/simple/tree/master/ts
hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp(at)hjp(dot)at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
From | Date | Subject | |
---|---|---|---|
Next Message | Luca Ferrari | 2020-11-21 15:34:14 | Re: two questions about toast |
Previous Message | Ron | 2020-11-21 09:31:09 | Re: pg_dump - how to force to show timestamps in client log |