Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kgESM-0008GD-CK for pgsql-general@arkaria.postgresql.org; Fri, 20 Nov 2020 22:00:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kgESJ-0002tI-W6 for pgsql-general@arkaria.postgresql.org; Fri, 20 Nov 2020 22:00:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kgESJ-0002tB-Lg for pgsql-general@lists.postgresql.org; Fri, 20 Nov 2020 22:00:35 +0000 Received: from mail-ot1-x32a.google.com ([2607:f8b0:4864:20::32a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kgESG-0002ng-Oo for pgsql-general@lists.postgresql.org; Fri, 20 Nov 2020 22:00:34 +0000 Received: by mail-ot1-x32a.google.com with SMTP id h16so10163966otq.9 for ; Fri, 20 Nov 2020 14:00:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=qjdjcX4YZe5S2tWHT2xUXoySQw0q3UkebW/TMRmKxxk=; b=NfnVKZipixO6zAvO8+QQz7Y6rSxOtc73NsenUWPzntFnv5dRUI7MEMOT0oLSh9LREB vstLQWt9H+sdk0TRNUyVnaJw1zNXr6Sk5IN0G6LhbHMT40SqEqf3tMjllspLaqmW7Vsh 6jxX4r2yKL4YI9Zy8SwxJptP4ok5AfCpqI0nf7/wBA3B0ToO7cRrnHzXl3BgepNW9sVa l0Ot/q5s4NVN3T4wNJoHmaE6c4Eoir9jh/FZWHAmoKHOPPNaGPkuAjIVxQQ2ra9m2+zo NU6uuYVzxcBUwo0djfkoT3XTXpS3QqGCh5Stxy4Q16pqinzq/b8ylEfMNRePtmrhfgfe GmDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=qjdjcX4YZe5S2tWHT2xUXoySQw0q3UkebW/TMRmKxxk=; b=k37P3PZBo23nFs23UvRzLg4px1R7Y8TWp3sbKbdA34fJ+ISRC+70NLYFd85vl40dLy IM396ABNGK3JeS/vs1RIi6XLIF2xhnMPJ/8g4MHqKPddw8xGgdFrXEjX/05zJ0h6VjJH PNVfHD7yUpZESEoR8w5jsI/9cAQnifpCbmM85IzWK4juIPSbtgJ88inqcv/96ib2M7ii 7l+jra09dYTD8TYTn316bLjLl2b5HzuW2JlNpYbUnY4DzFTmkt1I7wGJv2/DAxEt4hOI duyrR4kbdu+7ilIzGpqL/aYx50HZFvwa2O5bRCTYfJQYPTcJKCstUujsufXIqr9iNST4 al1A== X-Gm-Message-State: AOAM530k+4OB2D55wS4kfXkhchSIcxAZZuuHnkrZMiu46Ogy6ac5PFtT Z9PdA/kkgQxvVyz6qjKmzxQSDSffb7KbBQ== X-Google-Smtp-Source: ABdhPJxDlhwAzbvp0exXQA+mVqnUkRo9QUx5+YutZgH5kNESkBMKvliXX9msXfRbcFG/b5a8Qa5Bjg== X-Received: by 2002:a9d:7695:: with SMTP id j21mr14592995otl.294.1605909631237; Fri, 20 Nov 2020 14:00:31 -0800 (PST) Received: from [192.168.1.10] (ip174-67-141-204.no.no.cox.net. [174.67.141.204]) by smtp.googlemail.com with ESMTPSA id k20sm2208780ooh.47.2020.11.20.14.00.30 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Nov 2020 14:00:30 -0800 (PST) Subject: Re: pg_dump - how to force to show timestamps in client log To: pgsql-general@lists.postgresql.org References: <7919898d-f5c5-44f0-5af3-41808ba71dfc@gmail.com> <96a0c112-0ecd-ebe1-fba3-604ab25276bd@aklaver.com> From: Ron Message-ID: Date: Fri, 20 Nov 2020 16:00:29 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <96a0c112-0ecd-ebe1-fba3-604ab25276bd@aklaver.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/20/20 3:39 PM, Adrian Klaver wrote: > On 11/20/20 1:00 PM, Ron wrote: >> On 11/20/20 2:56 PM, Adrian Klaver wrote: >>> On 11/20/20 10:01 AM, Durumdara wrote: >>>> Hello! >>>> >>>> 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 >>>> ... >>>> etc. >>> >>> >>> If you are redirecting to a file it have the creation time that you can >>> use. Internally times don't really matter for the objects as the dump is >>> based on a snapshot. Said snapshot is based on visible transactions not >>> time. So for practical purposes they all occur at the same 'time'. >> >> It makes all the difference when monitoring the progress of a backup. >> > > With -v you will get running list of objects dumped, just not the time. > The time is only of value relative to the following. Progress will only be > measurable by determining what is left to run and the time for each > object. Not sure that is feasible as you would have to pre-run the dump to > get information about the number of objects and an estimate of the data > quantity involved and the effect of each on the other. I could see that > estimate getting worse the bigger the data set(and hence the more you > cared) got. Because at some point the load on the machine would affect the > output speed of the dump. By knowing the sizes of the tables, and how long it takes to takes the first "some" tables, then one can forecast how long it takes to backup the whole database. -- Angular momentum makes the world go 'round.