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 1gX5hs-0002St-RS for pgsql-general@arkaria.postgresql.org; Wed, 12 Dec 2018 14:41:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gX5hr-0005c7-8s for pgsql-general@arkaria.postgresql.org; Wed, 12 Dec 2018 14:41:47 +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 1gX5hq-0005c0-TH for pgsql-general@lists.postgresql.org; Wed, 12 Dec 2018 14:41:47 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gX5ho-0007uO-AH for pgsql-general@postgresql.org; Wed, 12 Dec 2018 14:41:45 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 7793B23225; Wed, 12 Dec 2018 09:41:43 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 12 Dec 2018 09:41:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=e v3j1AARLJnR07Rf5RKlI1nVQLw/+S9mDGEBJpsVfJY=; b=MV2Uzx/beJKJZMLxn KhN2xnh+WL1fsA386FyzYbj1f3kwo8HmVCe/jAJY3GknfY5CPozID+JB5eQT5K30 t2Jvgznt80Tg+QbW/927GxUOjWGvrKvAp6zNS4LiG206Dqyy+NkFJICqIer+uT7P B/qTbVMZkM4dOsfQU1nh7ZuaunDR3pY7bXgkToriM9IghUdRPCuze436jqlEqctC omwW+5TWW0A2m0L2mSGUG5JCsWLT+9JZQPIzZzhxgxu/PgpiQecd5bCq12kl6x56 JIgFO0KUTVHAmDpj0fpfkl0yD5YVI0stTys/75PJvSckFLTRb9msRXaCiRWJUg9V zUnhg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=ev3j1AARLJnR07Rf5RKlI1nVQLw/+S9mDGEBJpsVf JY=; b=wSZ7AxNyjEsCm5I6SOLtvb4VnljRpCSpxlAnbUvWOMNbmo6h9qTuzL/KD BtU/xUwsUth0yETA6S3yYNN1xbuS2EAfRY2qtngcfOo5kvI4fCDga+L+S+U+UuGZ 64nUgm6zzogoLE/mprVynZboVnpbuXACIfUtbUGzTESaFHTIDyoLvvNshpZxfsbR NHRgruWXfD0PjkRzWxmgkFtD7ixFaBCUlMFXj7IMnXx9wQUv0uDywxplJRVHA4u7 9hBcTBp+uIk/1Uu3RdhqlL5PZAX8R9OQXtE2JPDwMN0xytUoq/QDoLNJHy5l6sVR cFUZLuA1pce4exiMwpUWWrtw4aMGw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudegledgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefuvfhfhffkff gfgggjtgfgsehtkeertddtfeelnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceo rggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecukfhppeejuddrvd duvddrudefgedrfeenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgr vhgvrhesrghklhgrvhgvrhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id 4798CE4937; Wed, 12 Dec 2018 09:41:42 -0500 (EST) Subject: Re: Debian : No echo after pg_dump | psql To: Moreno Andreo , Andrew Gierth Cc: PostgreSQL mailing lists References: <690144ed-bfb2-e06e-2aba-4d8e9e99edaf@evolu-s.it> <87ftvjmd8m.fsf@news-spur.riddles.org.uk> <82322725-21f3-2027-5533-808e604208ab@evolu-s.it> From: Adrian Klaver Message-ID: Date: Wed, 12 Dec 2018 06:41:41 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <82322725-21f3-2027-5533-808e604208ab@evolu-s.it> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/12/18 4:51 AM, Moreno Andreo wrote: > Adrian, Andrew, thanks and apologies for the late reply > > Il 30/11/2018 05:08, Andrew Gierth ha scritto: >>>>>>> "Moreno" == Moreno Andreo writes: >>   Moreno> The command I'm using is >>   Moreno> root@xxxxx:~# pg_dump -v -C -h -p 6543 -U >> postgres >>   Moreno> | psql -h localhost -p 6543 -U postgres >>   Moreno> It presents a double password prompt after I run it: >>   Moreno> Password: Password for user postgres: >> >> This is going to prompt once for the remote host's password and twice >> for the local one (because -C), and the concurrently-running commands >> are going to be fighting over access to the terminal to do it. Best >> avoided by using pgpass or non-password-based auth methods. >> >> More seriously, you're misunderstanding how -C works. When you use -C, >> the database you specify to psql (or pg_restore) is NOT the database >> you're restoring into - the restored db will ALWAYS have the same name >> as it had when dumped (if that's not what you want then don't use -C). >> Instead, the database you specify to psql or pg_restore is the database >> to connect to to issue the CREATE DATABASE command, which should usually >> be 'postgres'. That explains this bit: >> >>   Moreno> If I create database (just database, not schema) on target >>   Moreno> machine, I receive the error "database xxxx already exists" but >>   Moreno> the dump goes on If I don't create it, I receive the error >>   Moreno> "database xxxx does not exist" and processing aborts. >> > I removed -C usage since the target database (the database itself, not > the schema) is created with a CREATE DATABASE before issuing pg_dump (so > I don't need it), but strange prompt behavior remained the same > > I'm having a really hard time these days, so I can't investigate > further. Maybe on holidays, when I hope the pressure will be released a > bit. Understood. > > Will report as soon as I can. > > THanks again > > Cheers, > > Moreno.- > > > > -- Adrian Klaver adrian.klaver@aklaver.com