Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rQHZt-000BbW-4X for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Jan 2024 01:52:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rQHZq-00HOJH-1X for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Jan 2024 01:52:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rQHZp-00HOJ9-LV for pgsql-bugs@lists.postgresql.org; Thu, 18 Jan 2024 01:52:17 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rQHZn-002O1m-5R for pgsql-bugs@postgresql.org; Thu, 18 Jan 2024 01:52:17 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1d706c117ceso670795ad.0 for ; Wed, 17 Jan 2024 17:52:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1705542732; x=1706147532; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=DvpH/UABepSvtcFajObf1w0m+Juq7ppxSOMkN2Ucng8=; b=FqM7zwrJMM0MQ+uprRUEEN9/vzN/j4OuijQOhUEi7/kVCVejK2k37vt4cucJl2M8bl s+NzR7y/ARh0x/vTiBBb1awt7CcnAzEc+sjWComghkBUJ/BmhHdU6LSiRaXrK7zvhBl+ 9OOI1WJTtX1h59re7YF1omFseq0Pcbpo8p341z7vs1D4zw8o65Sa4rJBzXJDBNUqz46B 9m4ZdcCbSVtQD5aKEt/ngW217UINPTpsF/U+D3yq+ovgE0A6lqrNfWwR62+G3Co2x8V/ NIb5LwxRDXrhR+InGlzcI0THAALFWk+gd/kveb6WOZMkyjw8pxRU2uEcvVJaYZUOXYJf oEDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705542732; x=1706147532; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=DvpH/UABepSvtcFajObf1w0m+Juq7ppxSOMkN2Ucng8=; b=azthoZzuwW+m9Araf5eCTjschdn4ttg4ysWMKhzV/9ZRru+YGD5D8wQnH2CdLQ3AuW CDhuLloGvi+GPKXlGPmYyB1tF/Z4VS6kS75YJS1jy3wjn9XMWLXNerWfNF7SkupFawA6 0LRq4kFKznZ52eUhXAKJCVrgpXY5Ze4H2DpHrjJaDqVoEk/ucIOvwb5tePVNppyKGjn3 9Ouxj6HCR/XIUeAl+44CdeeMY8fw0zhqmnDiswuzTYlZy0XBPBG2xA1Uj1tcLNb5m6DY 1RPgc8CtXKO5t1BI4ywnu3fZQMJvQwU1pSWnL9QstmkcdIxoczrBfgXOq0r90SrmfxrR LTtQ== X-Gm-Message-State: AOJu0YyM0rq4Vb/jc0A9Vsys55TL0aaE4y3uea1urSy5HgM1NXCtCpks wABpImjDwNfUVdmTGwW66oPsIId0nxYXVCU5KjWvfP4SztCTY5HJ0BtL7PkwHw== X-Google-Smtp-Source: AGHT+IHx2T+PH8n4470WiOpSeXm7mw+u6mNSjM/6/WsVj+EOGmSPm/UYxZN5mVyumHwWxSnI50acWQ== X-Received: by 2002:a17:902:6849:b0:1d6:f1b5:41bb with SMTP id f9-20020a170902684900b001d6f1b541bbmr183080pln.72.1705542732615; Wed, 17 Jan 2024 17:52:12 -0800 (PST) Received: from [172.24.2.15] ([12.126.244.130]) by smtp.gmail.com with ESMTPSA id a2-20020a170902ee8200b001d38a7e6a30sm290335pld.70.2024.01.17.17.52.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 17:52:12 -0800 (PST) Message-ID: Subject: Re: [16+] subscription can end up in inconsistent state From: Jeff Davis To: vignesh C Cc: Peter Smith , Robert Haas , Amit Kapila , pgsql-bugs@postgresql.org, Tom Lane Date: Wed, 17 Jan 2024 17:52:11 -0800 In-Reply-To: References: <5dff4caf26f45ce224a33a5e18e110b93a351b2f.camel@j-davis.com> <5438ebe33bce797e5ffe24eaca81f1d130af9617.camel@j-davis.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2024-01-17 at 15:31 +0530, vignesh C wrote: > There was a buildfarm failure at [1], I was able to reproduce it in > my > environment. The changes suggested by Tom Lane at [2] fixes the > problem. Apart from that pg_hba.conf should have authentication > configuration for the host which does not use unix domain sockets. > The > attached patch has the changes for the same. I don't think adding --create-role=C2=A0is quite the right solution. The point of the test is to distinguish between a password that comes from the environment ($publisher_connstr1) vs specified in the connection string ($publisher_connstr2). There's no reason to use SSPI for that, and therefore no reason to configure SSPI with --create-role. The change in your patch does allow the connection initiated as part of CREATE SUBSCRIPTION to succeed, but by a different path than what we need to test later anyway, so it seems confusing to me. We might as well just get pg_hba.conf configured correctly before issuing the CREATE SUBSCRIPTION. We can't just add a "host" line to the pg_hba.conf, though, because that violates this idea here (Cluster.pm): Authentication is set up so that only the current OS user can access the cluster. On Unix, we use Unix domain socket connections,=C2=A0with the socket in a directory that's only accessible to the current user to ensure that. On Windows, we use SSPI authentication to ensure the same (by pg_regress --config-auth). The 001_password.pl test just doesn't run if !$use_unix_sockets and I think we should do something similar. We still need to move the pg_hba.conf changes up above the CREATE SUBSCRIPTION. Regards, Jeff Davis