Enum TargetSessionAttributes
- Namespace
- Npgsql
- Assembly
- Npgsql.dll
Specifies server type preference.
public enum TargetSessionAttributes : byte
Fields
Any = 0
Any successful connection is acceptable.
PreferPrimary = 5
First try to find a primary server, but if none of the listed hosts is a primary server, try again in Any mode.
PreferStandby = 6
First try to find a standby server, but if none of the listed hosts is a standby server, try again in Any mode.
Primary = 3
Server must not be in hot standby mode.
ReadOnly = 2
Session must not accept read-write transactions by default (the converse).
ReadWrite = 1
Session must accept read-write transactions by default (that is, the server must not be in hot standby mode and the
default_transaction_read_only
parameter must be off).Standby = 4
Server must be in hot standby mode.