Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDpPO-00052I-9J for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Apr 2019 11:59:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hDpOP-0002XK-0Q for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Apr 2019 11:58:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDpOO-0002UL-JD for pgsql-hackers@lists.postgresql.org; Tue, 09 Apr 2019 11:58:20 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDpOL-0001o6-0B for pgsql-hackers@lists.postgresql.org; Tue, 09 Apr 2019 11:58:19 +0000 Received: from msg.df7cb.de (unknown [IPv6:2003:5b:203b:100:7627:eaff:fe52:8e03]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 44dm5L2P2vz3F1R; Tue, 9 Apr 2019 13:58:14 +0200 (CEST) Date: Tue, 9 Apr 2019 13:58:14 +0200 From: Christoph Berg To: Peter Eisentraut Cc: pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Unified logging system for command-line programs Message-ID: <20190409115814.GB1961@msg.df7cb.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Re: Peter Eisentraut 2019-04-01 > - There is support for setting a "log level". This is not meant to be > user-facing, but can be used internally to implement debug or > verbose modes. I'm not entirely sure what happened here, but I think this made pg_restore verbose by default (and there is no --quiet option). At least that's what the apt.pg.o upgrade regression tests say for 11->12: 09:12:49 ok 59 - pg_upgradecluster reported successful operation 09:12:49 not ok 60 - no error messages during upgrade 09:12:49 # Failed test 'no error messages during upgrade' 09:12:49 # at ./t/040_upgrade.t line 160. 09:12:49 pg_restore: connecting to database for restore 09:12:49 pg_restore: executing BLOB 1234 09:12:49 pg_restore: disabling triggers for tstab 09:12:49 pg_restore: processing data for table "public.tstab" 09:12:49 pg_restore: enabling triggers for tstab 09:12:49 pg_restore: processing BLOBS 09:12:49 pg_restore: restoring large object with OID 1234 09:12:49 pg_restore: restored 1 large object 09:12:49 pg_restore: connecting to database for restore 09:12:49 pg_restore: connecting to database for restore 09:12:49 pg_restore: disabling triggers for nums 09:12:49 pg_restore: processing data for table "public.nums" 09:12:49 pg_restore: enabling triggers for nums 09:12:49 pg_restore: connecting to database for restore 09:12:49 pg_restore: connecting to database for restore 09:12:49 pg_restore: disabling triggers for old 09:12:49 pg_restore: processing data for table "old.old" 09:12:49 pg_restore: enabling triggers for old 09:12:49 pg_restore: disabling triggers for phone 09:12:49 pg_restore: processing data for table "public.phone" 09:12:49 pg_restore: enabling triggers for phone 09:12:49 pg_restore: executing SEQUENCE SET odd10ok 61 - pg_lsclusters -h 09:12:49 ok 62 - pg_lsclusters output https://pgdgbuild.dus.dg-i.net/view/Testsuite/job/upgrade-11-12/lastFailedBuild/architecture=amd64,distribution=sid/console The code running there is: print 'Upgrading database ', $db, "...\n"; open SOURCE, '-|', $pg_dump, '-h', $oldsocket, '-p', $info{'port'}, '-Fc', '--quote-all-identifiers', $db or error 'Could not execute pg_dump for old cluster'; # start pg_restore and copy over everything my @restore_argv = ($pg_restore, '-h', $newsocket, '-p', $newinfo{'port'}, '--data-only', '-d', $db, '--disable-triggers', '--no-data-for-failed-tables'); open SINK, '|-', @restore_argv or error 'Could not execute pg_restore for new cluster'; https://salsa.debian.org/postgresql/postgresql-common/blob/master/pg_upgradecluster#L511-521 Christoph