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 1rcR4n-00088K-8z for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Feb 2024 14:26:29 +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 1rcR4l-0006GD-5z for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Feb 2024 14:26:27 +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 1rcR4k-0006G5-QV for pgsql-hackers@lists.postgresql.org; Tue, 20 Feb 2024 14:26:27 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rcR4i-000143-04 for pgsql-hackers@postgresql.org; Tue, 20 Feb 2024 14:26:26 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-563e6131140so5162142a12.2 for ; Tue, 20 Feb 2024 06:26:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708439183; x=1709043983; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=q0wnDLsL4Y9k0q90KzOj4N1VjhQsv7fRQL8b4+xlWiE=; b=fvawsokYP5OUe9iXLe3mgrsmQBPh/MgCFmhMPJVA5EKb7gWTESuNvZI6pvScoBmeZU J6ya2uWO5UA7+omE6z7igrFHVYzjBRxLozAukK0tw9ImAVlb/aS9+xtGpvgpQ1kQETPP Y3XsgvMk76IWtD6vcJYALYPmOwAt+XBGGdT5W/T+SMUw5fc/o8BFDtNHw61KhzvjWaq0 1FiWsp+Ln4wOFS2n79PnhA6vMpzmlu6bnNqSAoum8zs8Xg4L9FH5jmQFF0wxvB/WDE/R AS6Qu9IyD/vU+/a+MMAsOImGn8qxP8LNFpquOm20L4EQN3xTXMI8l+u/T9vWXRD042Vd 9EbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708439183; x=1709043983; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q0wnDLsL4Y9k0q90KzOj4N1VjhQsv7fRQL8b4+xlWiE=; b=nA70/GHiRT6Y+2k74cj975a6VroEHPU5Jpw+kUqqchnsj4hU/NuoqMf5GQV/5pR73X tDTJ8eIDL8P93vQ4c/MEQ9VC2StRJn4j7R0xhCxvsDyJNR349k3XChAdzRl2XrL18jaZ ayTjP2WviYnq9mxSPZinE367J2+Fa9mw9ZYcLO1gv0eisOTJ45LQZn9Ni4orBA5lVvMt Ew81FlRiRyXYxeJZfqdQsOOITwA9JmX30mkN3Dka4zd7D5HeBl4PFnLn7Qo0CSczlIPk 0DVaXS9fKz+/TEFqje3D2A4Ls1EPKm40guzHw0mmEBXBSJ9r71rZ8tGshmUpo3hhRDve T3CA== X-Forwarded-Encrypted: i=1; AJvYcCXeygvdYqliTgmH/MJj3YCVhllQ81hwppDnCEEj666XwP60v0hIGAFgi4XZu13Vb5qoyW/41Rs8eozrj+qtsiLx1ufzoXe4jwl84Twt X-Gm-Message-State: AOJu0Yy8BAOsVeoGScC2O7nIWIfOsE6AMgjO7kU8RCXFfEZAdnhFIlED ZZ8m3YbjbshAWjb/lfUPmiLm1/CamR0FyU5FVPLB4qppWzS47OAf0rs7In9Lf9MYTnswcSUgKsf Pq9OmP7zWsA0XsuQitu57w9z96RA= X-Google-Smtp-Source: AGHT+IG7iu89fNP95Z9jCGpGMWVzDmWq20CGzxVsedgkSKLBcLp9udwHFecPp3cCCJrQrG701nbnlpMKLn2FWVqLT1g= X-Received: by 2002:a17:906:6850:b0:a3e:8f9e:9d0b with SMTP id a16-20020a170906685000b00a3e8f9e9d0bmr4263383ejs.70.1708439182736; Tue, 20 Feb 2024 06:26:22 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Robert Haas Date: Tue, 20 Feb 2024 19:56:10 +0530 Message-ID: Subject: Re: Have pg_basebackup write "dbname" in "primary_conninfo"? To: "Hayato Kuroda (Fujitsu)" Cc: Ian Lawrence Barwick , pgsql-hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Feb 20, 2024 at 5:58=E2=80=AFPM Hayato Kuroda (Fujitsu) wrote: > > Seems weird to me. You don't use dbname=3Dreplication to ask for a > > replication connection, so why would we ever end up with that > > anywhere? And especially in only one of two such closely related > > cases? > > Just FYI - here is an extreme case. And note that I have applied proposed= patch. > > When `pg_basebackup -D data_N2 -R` is used: > ``` > primary_conninfo =3D 'user=3Dhayato ... dbname=3Dhayato ... > ``` > > But when `pg_basebackup -d "" -D data_N2 -R` is used: > ``` > primary_conninfo =3D 'user=3Dhayato ... dbname=3Dreplication > ``` It seems like maybe somebody should look into why this is happening, and perhaps fix it. --=20 Robert Haas EDB: http://www.enterprisedb.com