'Declaration Public Enum TargetSession Inherits System.Enum Implements System.IComparable, System.IConvertible, System.IFormattable
public enum TargetSession : System.Enum, System.IComparable, System.IConvertible, System.IFormattable
'Declaration Public Enum TargetSession Inherits System.Enum Implements System.IComparable, System.IConvertible, System.IFormattable
public enum TargetSession : System.Enum, System.IComparable, System.IConvertible, System.IFormattable
Member | Description |
---|---|
Any | When opening a connection, dotConnect for PostgreSQL connects to any working host from the list and returns an error only if it could not connect to all of the hosts. After connecting, hosts are switched for read-only commands using round-robin load balancing. This option is the best for cases when load balancing is not configured on the server side, but there are several servers, running replicas of the same database and not divided into standby and primary, and the user wants their order to determine their function. |
PreferPrimary | When opening a connection, dotConnect for PostgreSQL looks for a primary host in the list. If a connection fails when executing a command and no valid primary host is found when reexecuting it via failover, any valid host from the list is selected, and a standby host can be selected too. After a standby host is selected, standby hosts are switched for read-only commands using round-robin load balancing. |
PreferStandby | When opening a connection, dotConnect for PostgreSQL connects to any working standby host from the list. If there are no valid standby hosts in the list, an error occurs. After connecting, standby hosts are switched for read-only commands using round-robin load balancing. If a connection fails when executing a command and no valid standby hosts are found when reexecuting it via failover, any valid host from the list is selected, and a primary host can be selected too. |
Primary | When opening a connection, dotConnect for PostgreSQL looks for a primary host in the list. If there are no such host in the list, an error occurs. |
Standby | When opening a connection, dotConnect for PostgreSQL connects to any working standby host from the list. If there are no valid standby hosts in the list, an error occurs. After connecting, standby hosts are switched for any commands using round-robin load balancing. |
SuppressLoadBalancing | Default behaviour. dotConnect for PostgreSQL connects only to the first host in the list. It throws an exception and does not attempt to connect to other hosts if the first host is unavailable. |
System.Object
System.ValueType
System.Enum
Devart.Data.PostgreSql.TargetSession
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2