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 1sYlyB-00Dx4q-FF for pgsql-jdbc@arkaria.postgresql.org; Tue, 30 Jul 2024 12:28:47 +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 1sYly9-009GEE-MH for pgsql-jdbc@arkaria.postgresql.org; Tue, 30 Jul 2024 12:28:45 +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 1sYly9-009GE5-EU for pgsql-jdbc@lists.postgresql.org; Tue, 30 Jul 2024 12:28:45 +0000 Received: from mail-oo1-xc2d.google.com ([2607:f8b0:4864:20::c2d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sYly6-002FCQ-Fs for pgsql-jdbc@lists.postgresql.org; Tue, 30 Jul 2024 12:28:44 +0000 Received: by mail-oo1-xc2d.google.com with SMTP id 006d021491bc7-5d5cbe88f70so2199202eaf.0 for ; Tue, 30 Jul 2024 05:28:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722342520; x=1722947320; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Y+t42KBZi7m/GECqvESxeZaS+dJxAcgUl5/LAf1MShM=; b=Nu+Ok5I5oNzBX8mAB/MIHBMHBclWOxl5kO2tkwggF5S0FFrzFeNL9EbX4jYXUaqHXm EFM4btcPIsM3sL7aYrKr7EoggbAe9RQp9QCpz2W+i7kW8Fi+afnFVT043rLI3hodKStE SXyTONJBHg6AE2pqJUr1CDr0wYAX/5EKIuBv0Bu7SvmhOynPAHR3ILL3gi2bJseihDLd exkvm6X5f93GrmoArFKc+Fr0S58OjvjO4W7AeVJ9PVg/Bwa7Pbu33/NAeDglact4eOUn v+zHWhWYJsUFFQmxy0CqPx1QIj87LO9ioagPIOXZR/iM9hyJ1uygVvfFrTz8/Rm8hSQt 3i3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722342520; x=1722947320; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Y+t42KBZi7m/GECqvESxeZaS+dJxAcgUl5/LAf1MShM=; b=WaQFY093QY7Ok/+CwdTBzA57893FmfOQ2V36gLI8lWy/rxf1oY8vDaIrARj7gA0TGN EDZydBhbE9Zik66S4GAZSr1EQDRKZwO8Wa+1RskiUO499j/ekk4U3Cks78Pf7tlO3DkS HKacQMwvEAYqZ78c0mJGfvEQ9LuzC3eY4joA8hL/jFrS5q2GZyB2QFqwG8iYiijwH9VV uSxWZGbE/iPQ7gauA8sD3xIlYAYwtDSIXUWAwP1ORUf226hNUQWN9LDxD0h1H/o4sXfH XBRa+bP8lAPxnDfCKRuB4dqa0rQo2fuBvg5TVg8em6krKT/MsD/JGY7TpYB/iS++VIi1 wFmw== X-Gm-Message-State: AOJu0Ywb9paDT6kWfIFVbnRLAypXlAOXh2o4ct45Qct5HXxQTIgdBu82 KkwmS1q0FfASnhCR+pAAuX56J1Jbugwhl/eD057MnAND1JzS+i/+nHJ1bjoAYhIrHE3N5wi9MzH LPb8ymI+ePUkeiS5VvvlHNtuG5ZlLOw== X-Google-Smtp-Source: AGHT+IHJTh7feS3+xUt1cnM7wdXgThaH2tEtNdmeSOsINDGRe7fNIEdUBxMZM+pe0SwNqpV4mb8EbvjeLJNDuWGHTSY= X-Received: by 2002:a05:6820:1f02:b0:5d6:c77:fb85 with SMTP id 006d021491bc7-5d60c7802f1mr497607eaf.0.1722342520087; Tue, 30 Jul 2024 05:28:40 -0700 (PDT) MIME-Version: 1.0 From: James Pang Date: Tue, 30 Jul 2024 20:28:29 +0800 Message-ID: Subject: jdbc connection multiple host To: pgsql-jdbc@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000176b65061e761e45" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000176b65061e761e45 Content-Type: text/plain; charset="UTF-8" We plan to migrate Oracle to Postgresql databases. Application put multiple host:ip in connection string, jdbc://host1ip:port,host2:port/dbname , when host1 is accessible, it's preferred. when host1 is not accessible, host2:port is secondary. how to do that through Postgresql JDBC driver ? Thanks, James --000000000000176b65061e761e45 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
=C2=A0We plan to migrate Oracle to Postgresql databases. A= pplication put multiple host:ip in connection string, jdbc://host1ip:port,h= ost2:port/dbname=C2=A0, when host1 is accessible, it's preferred. when = host1 is not accessible, host2:port is secondary.=C2=A0
=C2=A0 how to d= o that through=C2=A0 Postgresql JDBC driver ?=C2=A0

Thanks,

James
--000000000000176b65061e761e45--