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 1hJPLL-0002ZP-UG for pgsql-bugs@arkaria.postgresql.org; Wed, 24 Apr 2019 21:22:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hJPLK-00026C-Bf for pgsql-bugs@arkaria.postgresql.org; Wed, 24 Apr 2019 21:22:14 +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 1hJPHL-00077C-0L for pgsql-bugs@lists.postgresql.org; Wed, 24 Apr 2019 21:18:07 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJPHF-0006nm-Bs for pgsql-bugs@lists.postgresql.org; Wed, 24 Apr 2019 21:18:03 +0000 Received: by mail-wr1-x442.google.com with SMTP id t17so15371701wrr.4 for ; Wed, 24 Apr 2019 14:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=pRWHB6VLI9UFExbNFf6sTygsRoBlK+6emkj1jnWPXPM=; b=eGUMpRzf+mW+jzznWpPakxkASPoNYjaE6Ou0s0BH4/tPv6ZUIwql/2dprTFEABNHP6 Fmcz78AMXwnUpW2q8p11spPQUEeEYn8FGah2YGswLTIQGsVU1Rzke4xZulbNVuX3m5hc TYIng9+jpODvVtr21JyO5UZ/TnwocaROBL7XlEorQCX9J+anCmSaQ+bUexdAvbcxeIfb 7zkxALpJnxsCkGlTCrpZKkxt1GB8ZeKr3zWi0AJEOeqSnqKCUbqB5SkpylcKo3EXmjWd uEVKOip1ADkH/oovgIdPIR3kbInWscVQcH5G4YVLl4epSSpJrVjejlnw4PZ3WrCkGc7o KfKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=pRWHB6VLI9UFExbNFf6sTygsRoBlK+6emkj1jnWPXPM=; b=ZfJhdPiM0cYf2xoBwFZsTbF7cuAjBWZ62Z+lDrwcBl/0ujCEC+vzD72nHNdwSyBmRB bSLW1vHRmuExJQhLBwsJ6RpnKLVxPZMyAlunw88C8fZGrxCQuLoOOxl44VPDEg4icm8s nhNDYlCAl1DbbWqXwXmDXW/F29gJ2H8WFrjC6hJ7evuRXeVsb4f8hpbCnsEtOhjDgcMB NieDzShxkzDX9uTIlX7/tzQmsOcut7qeRG3fu5N11LfcaKopkb7byuVlbqyhcekBFfyv VmIowAWJXHsHsKYz14Ym/7tjnJCeOw+Pp6QZKiLNQIuhRYScCJLMGhDxKZaKzdYVOVc2 lJxg== X-Gm-Message-State: APjAAAWcu5XCZSWGgvs8fcYwoED8BN6E677dnQoxUAfqOhVH+qzTXcDl lCtO+SYz/2I42QIX4712nvwFMUlEk1M= X-Google-Smtp-Source: APXvYqy/4lFX0ADVpnm7W0Xz3RUTNn0StmCw4KQ89hp7neL6oTl+bTGrRA6pDZZvJBFOYxm0KZ/mOA== X-Received: by 2002:adf:e68d:: with SMTP id r13mr4838374wrm.84.1556140679565; Wed, 24 Apr 2019 14:17:59 -0700 (PDT) Received: from localhost (ip-86-49-243-43.net.upcbroadband.cz. [86.49.243.43]) by smtp.gmail.com with ESMTPSA id z11sm19239132wmf.12.2019.04.24.14.17.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2019 14:17:51 -0700 (PDT) Date: Wed, 24 Apr 2019 23:17:50 +0200 From: Tomas Vondra To: Mike Lissner Cc: pgsql-bugs@lists.postgresql.org Subject: Re: CREATE SUBSCRIPTION fails with long passwords Message-ID: <20190424211750.o7nzdykqrlnnikac@development> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716-1444-295967 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Apr 24, 2019 at 10:07:45AM -0700, Mike Lissner wrote: > This made me a bit crazy tonight. Steps to reproduce: > 1. Create a new role and give it a really long password. Ours was 108 > chars. > 2. Set up all the necessary replication permissions/roles. > 3. From another computer, try to connect as that user using psql — it > works! > 4. Now try a CREATE SUBSCRIPTION command like: > create subscription my_sub connection 'host=192.168.0.111 port=5432 > user=the_new_user password=long_password dbname=my_db sslmode=require' > publication new_server; > You'll get the following error: > ERROR:  could not connect to the publisher: FATAL:  password > authentication failed for user "the_new_user" > Now, go back and shorten that password, and try again. You'll get: > create subscription my_sub connection 'host=192.168.0.111 port=5432 > user=the_new_user password=long_password dbname=my_db sslmode=require' > publication new_server; > NOTICE:  created replication slot "my_sub" on publisher > CREATE SUBSCRIPTION > > And it'll be off to the races. I watched the logs on both servers during > these experiments. Nothing much in there, aside from the logs above. > Is this known functionality? Seems like a nasty bug and it took me a while > to figure it out. I've tried to reproduce this on a master, and it works for me (with 200 char passwords). Which version have you used? Can you share an actual example of commands creating the role/subscription that triggers the failure, including the password value? regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services