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 1gSP5M-0003GU-V3 for pgsql-general@arkaria.postgresql.org; Thu, 29 Nov 2018 16:22:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gSP5L-0004vX-Nk for pgsql-general@arkaria.postgresql.org; Thu, 29 Nov 2018 16:22:39 +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 1gSP5K-0004XF-2P for pgsql-general@lists.postgresql.org; Thu, 29 Nov 2018 16:22:39 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gSP5G-00067Q-S8 for pgsql-general@postgresql.org; Thu, 29 Nov 2018 16:22:36 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 79ED810DA; Thu, 29 Nov 2018 11:22:33 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 29 Nov 2018 11:22:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=E wo7pm047uoyxN/jJFBPkfgHAUuXPR3yWfn6gRMF/7Q=; b=BW3Tjap9buryQbedt YeEcMLIdrp7x4kt13ju1D65Q1VYDk7ry+IB477jLJHjahebbR1ptA/FHzuMJVX6Y nJaITy9aqsS1cOKP+ewp3FzHM6miaHviEJBJvH+LS0wXPlFDMUAiZ8VszDF0R9oz vzjiwfmWKVtMecLABjUtWWedaXMVWRgOfu1aUtrfYdg9DLl4HxPvJHpSpQUdc50j xy6u/r4lZF7c9SqqB2W9cyvVU4bR/S1uBPrzFAyiw63SQnm/DrznHpzSmLm6dFPZ Cm8r455MtrvI0GZNpGmUaZ8JH8dYS1DXTuMpGPNjxgVarEHqkEoiflRBeaJ35g3r 39nUg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=Ewo7pm047uoyxN/jJFBPkfgHAUuXPR3yWfn6gRMF/ 7Q=; b=ZPNtzTWcZnJ3ZIYGRn16xFQAywoh3a+fIcWo96lfuvuriiP0V1Sp55172 1wSi+VJipPHte78dwfORg/Akdgosg+fTTIEVWVQQ4pX2H1A2s6huRRfn3uAI8rpy Q9XMJiCoBLA6uKqMIdmphEoyqZOHfi3M61T5rTD4RaOVLHd1Ip/NBDEQJ/L00K+t YCdnPqlbiypLWmQmzhKHMY0quTQVM7+4C0MZlcNxexFu1RSz5dFEv/3yOL8Ie3BQ QeN6J1V6oKB4Gj8dMUt2GB276gRoxy+TzT4YogIxp24BqCy7SJLgnfYi/NbjbJIN KqSNLUyi9ZfpaYQ2HvkDPxAZBHGwg== X-ME-Sender: X-ME-Proxy: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id E5880E44F4; Thu, 29 Nov 2018 11:22:31 -0500 (EST) Subject: Re: Debian : No echo after pg_dump | psql To: Moreno Andreo , PostgreSQL mailing lists References: <690144ed-bfb2-e06e-2aba-4d8e9e99edaf@evolu-s.it> From: Adrian Klaver Message-ID: Date: Thu, 29 Nov 2018 08:22:31 -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: <690144ed-bfb2-e06e-2aba-4d8e9e99edaf@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 11/29/18 8:12 AM, Moreno Andreo wrote: > Hi guys, >     I'm facing a strange thing on my test server (Google Cloud) > > On my Debian 9 box I'm running Postgres 9.6.10, and I'm transferring > some databases from another server (Debian 8, PG 9.5.15). > > The command I'm using is > root@xxxxx:~# pg_dump -v -C -h -p 6543 -U postgres > | psql -h localhost -p 6543 -U postgres > It presents a double password prompt after I run it: > Password: Password for user postgres: > > I enter _once_ my postgres password, and it starts processing data. > > At a certain point it suddenly stops processing without prompting > anything, and goes on only if I insert my postgres password again, as if > it was for one of the two prompts it showed at the beginning where I > entered only one password. > After another bit of processing, it asks another time (the third!) my > postgres password. After I entered it, it goes to the end (and there are > no issues in data or anything simia. > > After this, I have no more echo on what I'm typing, but if I type > something and press enter, I can see the result of the command I just > typed (and have not seen) on the console. > > Restarting the SSH session resolves the problem. > > The same strange behavior is the same if I switch servers (running > pg_dump on Debian 8/PG 9.5 connecting on Debian 9/PG 9.6) Look into the .pgpass file: https://www.postgresql.org/docs/10/libpq-pgpass.html Or if you already have one check that is set up for both the remote and local servers. > > Another thing I was forgetting to report: > > If I create database (just database, not schema) on target machine, I > receive the error "database xxxx already exists" but the dump goes on Might look at --clean: https://www.postgresql.org/docs/10/app-pgdump.html -c --clean Output commands to clean (drop) database objects prior to outputting the commands for creating them. (Unless --if-exists is also specified, restore might generate some harmless error messages, if any objects were not present in the destination database.) This option is only meaningful for the plain-text format. For the archive formats, you can specify the option when you call pg_restore. > If I don't create it, I receive the error "database xxxx does not exist" > and processing aborts. > > Hope I've been clear enough...... > > Has someone bumped into it? > > Thanks in advance > > Moreno.- > > > > -- Adrian Klaver adrian.klaver@aklaver.com