Fabrice Aneche
9b59dd0346
added a kitlog level log adapter
2021-01-27 16:36:58 -06:00
Jack Christensen
8c7667376e
Update dependencies
2020-12-03 19:43:27 -06:00
Ethan Pailes
1df45d758d
fix stmtcache invalidation
...
This patch fixes jackc/pgx#841. The meat of the fix lives
in [a PR to the pgconn repo][1]. This change just checks
for errors after executing a prepared statement and informs
the underlying stmtcache about them so that it can properly
clean up. We don't try to get fancy with retries or anything
like that, just return the error and allow the application to handle it.
I had to make [some][1] [changes][2] to to the jackc/pgconn package as well
as this package.
Fixes #841
[1]: https://github.com/jackc/pgconn/pull/56
[2]: https://github.com/jackc/pgconn/pull/55
2020-11-12 08:15:13 -05:00
Jack Christensen
d660c48ffc
Upgrade pgconn to 1.7.2 to fix slice capacity issue
...
fixes #859
2020-11-03 19:23:01 -06:00
Jack Christensen
59a40dbf84
Upgrade pgconn and pgtype
2020-10-31 17:30:27 -05:00
Jack Christensen
f23bd4824d
Upgrade pgtype to v1.5.0
2020-09-26 11:56:52 -05:00
Jack Christensen
3e9614fdb4
Upgrade pgconn to v1.7.0
2020-09-26 11:56:52 -05:00
Jack Christensen
f9204b4c10
Upgrade puddle to v1.1.2
2020-09-26 11:56:52 -05:00
Jack Christensen
d4a300bd58
Fix: FieldDescriptions are available on Rows before calling Next
2020-09-05 13:24:57 -05:00
Jack Christensen
2ec377350b
Update Rows.Scan documentation to reflect reality.
...
Previously, the Scan documentation stated that scanning into a []byte
will skip the decoding process and directly copy the raw bytes received
from PostgreSQL.
This has not been true for at least 2 months. It is also undesirable
behavior in some cases such as a binary formatted jsonb. In that case
the '1' prefix needs to be stripped to have valid JSON. If the raw
bytes are desired this can easily be accomplished by scanning into
pgtype.GenericBinary or using Rows.RawValues.
In light of the fact that the new behavior is superior, and that it has
been in place for a significant amount of time, I have decided to
document the new behavior rather than change back to the old behavior.
2020-09-05 11:26:19 -05:00
Jack Christensen
997a16dbc5
Update pgconn for renamed CleanupChan
2020-08-20 22:09:50 -05:00
Jack Christensen
39b096d01e
pgxpool waits for connection cleanup to finish before making room in pool
...
refs #679
2020-08-20 22:04:56 -05:00
Jack Christensen
cce1d671f4
Update pgconn to v1.6.4
2020-07-29 22:18:05 -05:00
Jack Christensen
b8c5857880
Release v4.8.0
2020-07-22 06:49:50 -05:00
Jack Christensen
47cc8bb43e
Update pgconn and pgtype dependencies
2020-07-14 12:03:00 -05:00
Jack Christensen
8de0c48af0
Update dependencies
2020-06-27 12:30:58 -05:00
Jack Christensen
59a28af6de
Update dependencies
2020-06-06 11:00:22 -05:00
Jack Christensen
81140f6c27
Improve stdlib performance with large results
2020-06-06 09:49:14 -05:00
georgysavva
e29ce9f6d6
Add Config.Copy() in pgx and pgxpool packages. Conn.Config() and Pool.Config() return copy of the original config.
2020-06-02 13:35:05 +03:00
georgysavva
608451a215
Store original config in Conn before updating it.
2020-06-01 19:38:12 +03:00
Jack Christensen
4b95a747d7
Use pgtype.NewValue instead of reflect for Values()
...
This is both cleaner and necessary for pgtype.TypeValue types.
2020-05-30 13:32:15 -05:00
Jack Christensen
b1fc2870e5
go mod tidy
2020-05-16 08:21:04 -05:00
Jack Christensen
38dd42de4b
Support new pgtype format preferences
2020-05-10 14:09:02 -05:00
Jack Christensen
aabe5538a8
Optimize large result sets
2020-05-09 23:57:20 -05:00
Jack Christensen
a66b09fbd8
Improve simple protocol / text format
...
Increased data type support for simple protocol. Improved test
coverage of simple protocol. This has the additional advantage of
exercising the text encoders and decoders.
2020-05-08 16:20:15 -05:00
Jack Christensen
f9ce8af5c9
Add explicit enum support
2020-05-07 22:28:46 -05:00
Jack Christensen
bc4586ac6f
Update to puddle v1.1.1
...
Fixes potential race condition if health check is creating new
connections while the pool is closed.
2020-04-02 22:24:09 -05:00
Jack Christensen
cdec57523d
Update to pgtype v1.3.0
2020-03-30 11:31:23 -05:00
Jack Christensen
da5c28239b
Update to pgconn v1.5.0
2020-03-30 11:21:43 -05:00
Jack Christensen
95907c29ce
Update pgconn and pull in fix for QueryRow with empty SQL
2020-03-07 13:27:01 -06:00
Jack Christensen
8848816c13
Update pgconn to v1.3.2 for better default buffer size
2020-02-14 17:58:38 -06:00
Jack Christensen
cb1a1ebefa
Update pgconn, pgtype, and puddle
2020-02-05 11:16:59 -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
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
Jack Christensen
3a1f0bafbe
Update pgconn to 1.3.0
2020-01-23 21:00:24 -06:00
Jack Christensen
4ec6ee76fe
Update to pgconn v1.2.1
2020-01-13 08:50:28 -06:00
Jack Christensen
fce41c0b24
Update pgconn and pgtype
2020-01-11 19:23:53 -06:00
Jack Christensen
693ba65a4a
Update pgtype to v1.0.3
2019-11-16 11:11:15 -06:00
Jack Christensen
e7c61d382e
Upgrade to pgtype v1.0.2
...
Pull in pointer to pointer scan fix
2019-10-22 20:46:30 -05:00
Jack Christensen
93a2aa5b2f
Releasing a busy connection closes the connection
...
refs #622
2019-10-12 11:26:51 -05:00
Jack Christensen
9d3a4b5736
Update pgconn and pgtype
2019-09-19 22:34:10 -05:00
Jack Christensen
2799739ef3
Update underlying packages to final release versions
2019-09-14 20:31:06 -05:00
Jack Christensen
0648e1c69f
Update to latest pgconn
2019-09-10 17:28:31 -05:00
Jack Christensen
486d64daed
Update pgtype and pgproto
2019-08-27 21:18:25 -05:00
Jack Christensen
8170eaf401
Update to latest version of pgconn
...
- Also remove a few tests of functionality that is handled by pgconn
2019-08-27 18:22:34 -05:00
Jack Christensen
169632e028
Refactor format code choosing
2019-08-25 00:38:50 -05:00
Jack Christensen
8f080dcbb2
Update pgconn for access to min_read_buffer_size param
2019-08-25 00:23:07 -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
3675337e5b
Update for rename of pgconn.PreparedStatementDescription
2019-08-24 20:44:56 -05:00
Jack Christensen
0c3e59b07a
Add automatic statement cache
2019-08-24 20:29:54 -05:00
Jack Christensen
6972a57421
pgtype.OID type should only be used for scanning and encoding values
...
It was a mistake to use it in other contexts. This made interop
difficult between pacakges that depended on pgtype such as pgx and
packages that did not like pgconn and pgproto3. In particular this was
awkward for prepared statements.
This is preparation for removing pgx.PreparedStatement in favor of
pgconn.PreparedStatement.
2019-08-24 13:55:57 -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
faa980a256
Add tests for deferred constraint errors
...
Port tests from v3.
Fix is implemented in pgconn f0b479097a
.
2019-08-06 17:17:54 -05:00
Jack Christensen
c5a70faea6
Update xerrors and pgconn packages
2019-05-28 06:55:44 -05:00
Jack Christensen
f26125d913
Update pgconn for fallback config fix
2019-05-27 12:51:45 -05:00
Jack Christensen
6d23b58b01
Update url_shortener example
2019-05-17 14:13:03 -05:00
Jack Christensen
85ddbfeeee
Remove 2 mallocs from query path
2019-05-04 08:55:05 -05:00
Jack Christensen
9008387300
Update pgconn
2019-04-27 15:45:59 -05:00
Jack Christensen
aed6b822d9
Split batch command and result
2019-04-24 16:39:06 -05:00
Jack Christensen
1b8f0016e9
Split pgtype into own repo
2019-04-20 19:20:00 -05:00
Jack Christensen
efb333df6b
Fix go modules
...
Wow. This is fun. Sure is easy to get modules wrong when upgrading a v2+
project.
2019-04-20 17:41:08 -05:00
Jack Christensen
b7e56b003a
Replace lastStmtSent with pgconn support
2019-04-20 17:12:20 -05:00
Jack Christensen
af1beca9a5
Update pgconn to resolve batch deadlock issue
2019-04-20 11:27:43 -05:00
Jack Christensen
2978a7440a
Use pgconn for more conn status
2019-04-19 16:18:47 -05:00
Jack Christensen
ae73ca2da1
Update to more effecient pgconn
2019-04-19 15:55:45 -05:00
Jack Christensen
6c1be9b220
Add pool configuration
...
MaxConns is only knob at moment
2019-04-13 18:55:02 -05:00
Jack Christensen
7718ee6207
Remove Ex versions of Query and QueryRow
...
Always require context and prepend options to arguments if necessary.
2019-04-10 12:12:22 -05:00
Jack Christensen
ec10fdde8b
Core of new connection pool
2019-04-09 21:32:01 -05:00
Jack Christensen
1715b17abb
Handle too many params in pgconn
2019-04-05 12:09:15 -05:00
Jack Christensen
858d00788a
Use extracted packages with Go modules
2019-04-05 10:59:47 -05:00