Jack Christensen
f18351f61c
Use ++ instead of += 1
2020-05-07 22:28:46 -05:00
Jean-Baptiste Bronisz
4127eba03f
[pgxpool] Fix connection leak if BeginTx() fail
2020-04-07 22:31:09 +02:00
georgysavva
5d453485a9
Introduce new pool setting: LazyConnect
2020-04-03 10:28:05 +03:00
Jack Christensen
f76d37a387
Do not run timing sensitive test in parallel
...
This test
2020-04-02 22:24:09 -05:00
Jack Christensen
0329f12e05
Remove unneeded goroutine spawn in connection pool destructor
...
fixes #708
2020-04-02 22:24:09 -05:00
Jack Christensen
8c9d1cc15b
Add test case for #677
2020-02-07 16:07:43 -06:00
Jack Christensen
22ad987698
Add a timeout to pgxpool min connection creation
...
Ensure that CreateResource can't hang.
2020-02-05 11:25:15 -06:00
Patrick Ellul
a01827732f
Implements MinConns, the minimum size of the connection pool.
...
The health check will increase the number of connections to this amount if it had dropped below.
2020-02-04 08:17:53 +11:00
Jack Christensen
2d20ba7ba4
Add doc for pool_max_conn_idle_time option
2020-02-01 09:45:20 -06:00
Patrick Ellul
5082e30c4c
Implement maximum connection idle time (MaxConnIdleTime) for pgxpool.
...
If a connection has been idle for longer than maxConnIdleTime, the health check will destroy it.
2020-01-28 16:36:34 +11:00
Adam Pantel
167442e66b
Add a couple error checks
2019-11-22 11:51:58 -05:00
Jack Christensen
0d8dcd87b0
Fix pgxpool Rows.CommandTag()
2019-10-21 13:57:39 -05:00
Jack Christensen
93a2aa5b2f
Releasing a busy connection closes the connection
...
refs #622
2019-10-12 11:26:51 -05:00
Jack Christensen
143bc3165d
Add Conn() to Tx interface.
...
This is necessary to allow code using a Tx to access the *Conn (and
pgconn.PgConn) on which the Tx is executing.
2019-10-12 09:35:29 -05:00
Jack Christensen
a8691a7066
Add RawValues to Rows
2019-09-10 17:58:24 -05:00
Jack Christensen
f6bbf4bc3b
Add package docs for pgxpool
2019-09-02 12:18:30 -05:00
Jack Christensen
b5ce0220f8
Add CommandTag to Rows interface
...
This allows handling queries where it is unknown if there will be a
result set or not. If it is not a result set returning query the
command tag will still be available.
2019-09-02 09:53:26 -05:00
Jack Christensen
f20f026b7d
Pool BeforeAcquire hook takes context
2019-08-31 08:57:03 -05:00
Jack Christensen
ddd9cf451e
Update pgxpool for latest pgconn
2019-08-27 18:29:14 -05:00
Jack Christensen
a262126b5c
Replace IsAlive with IsClosed
...
IsAlive is ambiguous because the connection may be dead and we do not
know it. It implies the possibility of a ping. IsClosed is clearer -- it
does not promise the connection is alive only that it hasn't been
closed.
2019-08-24 23:49:59 -05:00
Jack Christensen
d5a6a5e7e0
Remove Results suffix from BatchResults methods
2019-08-24 23:41:28 -05:00
Jack Christensen
64b07f0d66
Batch uses statement cache.
...
This streamlines Queue's interface as well.
2019-08-24 23:40:21 -05:00
Jack Christensen
b2b949afa4
Rename BeginEx to BeginTx and update docs
2019-08-24 20:50:24 -05:00
Jack Christensen
3675337e5b
Update for rename of pgconn.PreparedStatementDescription
2019-08-24 20:44:56 -05:00
Jack Christensen
31705e586a
Use pgconn.PreparedStatementDescription directly
...
Instead of having similar pgx.PreparedStatement
2019-08-24 14:29:05 -05:00
Jack Christensen
b7b52ff079
Require conn and pool configs to be created by ParseConfig
...
This simplifies handling default values. Now there is no ambiguity
between a zero value and a default value. All default values are set by
ParseConfig and the user can modify them after the initial creation.
fixes #567
2019-08-24 09:53:38 -05:00
Jack Christensen
99e5461522
Add pgx.Tx interface and pseudo nested transaction support
...
This complicates the idea of a persistent transaction status and error
so that concept was removed.
2019-08-17 17:22:14 -05:00
Jack Christensen
c3e41872a8
Resplit Begin and BeginEx
...
This is in preparation for a Begin / Tx interface that will similate
nested transactions with savepoints.
In addition, this passes the TxOptions struct by value and thereby
removes an allocation.
2019-08-17 15:53:55 -05:00
Jack Christensen
08b412740f
Rename package pool to pgxpool
...
pool is too common a name to occupy.
2019-06-29 11:37:36 -05:00