+6
-4
@@ -82,6 +82,12 @@ func (detachedCtx) Err() error { return nil }
|
|||||||
|
|
||||||
// Pool allows for connection reuse.
|
// Pool allows for connection reuse.
|
||||||
type Pool struct {
|
type Pool struct {
|
||||||
|
// 64 bit fields accessed with atomics must be at beginning of struct to guarantee alignment for certain 32-bit
|
||||||
|
// architectures. See BUGS section of https://pkg.go.dev/sync/atomic and https://github.com/jackc/pgx/issues/1288.
|
||||||
|
newConnsCount int64
|
||||||
|
lifetimeDestroyCount int64
|
||||||
|
idleDestroyCount int64
|
||||||
|
|
||||||
p *puddle.Pool
|
p *puddle.Pool
|
||||||
config *Config
|
config *Config
|
||||||
beforeConnect func(context.Context, *pgx.ConnConfig) error
|
beforeConnect func(context.Context, *pgx.ConnConfig) error
|
||||||
@@ -96,10 +102,6 @@ type Pool struct {
|
|||||||
healthCheckPeriod time.Duration
|
healthCheckPeriod time.Duration
|
||||||
healthCheckChan chan struct{}
|
healthCheckChan chan struct{}
|
||||||
|
|
||||||
newConnsCount int64
|
|
||||||
lifetimeDestroyCount int64
|
|
||||||
idleDestroyCount int64
|
|
||||||
|
|
||||||
closeOnce sync.Once
|
closeOnce sync.Once
|
||||||
closeChan chan struct{}
|
closeChan chan struct{}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user