Erik Johnston
b7215c60d9
Split State into two.
...
There is no reason for the buffer and typeinfo caches to share the same
lock. By splitting them it means we a) get slightly better performance,
but more importantly b) it makes it harder to accidentally deadlock.
2021-05-14 15:20:36 +01:00
Erik Johnston
a84a45d88e
Fix deadlock when pipelining statements.
...
When executing statements in parallel there is a race where we prepare
the type info queries multiple times, and so insert into the type info
caches multiple times. This resulted in any existing cached `Statement`
to be dropped, running its destructor which attempts to take out the
state lock that is already being held, resulting in a deadlock.
Fixes #772 .
2021-05-14 14:59:07 +01:00
Steven Fackler
36916bec38
Release v0.7.2
2021-04-25 10:52:25 -04:00
Steven Fackler
91ce9cdeec
fix clippy
2021-04-24 10:34:51 -04:00
Steven Fackler
05a0643cc0
Fix matching on SqlState
...
Closes #756
2021-04-24 10:19:23 -04:00
Steven Fackler
c7a8adf2df
remove unneeded ref
2021-04-05 19:07:27 -04:00
Steven Fackler
50fa995cf9
Reorder a bit
2021-04-05 19:04:34 -04:00
Steven Fackler
a8ac31aa0f
Merge pull request #724 from vemoo/transaction-client-method
...
add `client` method to `GenericClient`
2021-04-05 19:02:37 -04:00
Steven Fackler
57164c7e59
Release tokio-postgres v0.7.1
2021-04-03 17:12:50 -04:00
Steven Fackler
844a27a074
Add clear_type_cache to blocking client
2021-04-03 16:55:59 -04:00
Dmitriy Pleshevskiy
558c169b89
feat: add method to clear types cache
...
Closes #753
2021-04-01 23:39:50 +03:00
Steven Fackler
fc10985f9f
rustfmt
2021-03-28 20:31:59 -04:00
Steven Fackler
af7825308d
fix clippy
2021-03-28 20:28:18 -04:00
hansolshin
71cb6eef68
Add is_closed method to Error
2021-03-28 23:00:49 +09:00
Steven Fackler
49db9cd33c
upgrade socket2
2021-03-18 20:39:43 -04:00
Steven Fackler
ad2c8cf592
clippy
2021-03-16 20:44:50 -04:00
Michael Kirk
8b8491f31d
retain support for geo-types-0.6
2021-01-25 14:52:02 -06:00
Michael Kirk
37fb39202a
Added support for geo-types
0.7 via with-geo-types-0_7
feature
2021-01-25 09:30:30 -06:00
Steven Fackler
cc6a0ada01
Add back Error::as_db_error
...
Closes #732
2021-01-16 14:19:14 -05:00
Lachezar Lechev
41375ebd3c
Update tokio version in feature docs
2021-01-13 11:53:29 +02:00
Jeff Davis
f3cbc8ce04
PgLsn type.
2021-01-09 15:18:26 -08:00
Bernardo Uriarte Blanco
e2d327399b
add client
method to GenericClient
2020-12-26 23:17:04 +01:00
Steven Fackler
fbc42ecbe8
Stop setting timezone to UTC
...
Closes #147
2020-12-26 15:51:22 -05:00
Steven Fackler
316c6dc3dc
Update codegen sources to 13.1
2020-12-26 14:09:58 -05:00
Steven Fackler
4fb6fd906f
Release tokio-postgres v0.7.0
2020-12-25 09:09:17 -05:00
Steven Fackler
71fc3e74bd
Release postgres-types v0.2.0
2020-12-25 09:02:02 -05:00
Steven Fackler
06dcebf248
Release postgres-protocol v0.6.0
2020-12-25 08:51:47 -05:00
Nikhil Benesch
f1729e4636
deps: upgrade to tokio v1.0 ecosystem
2020-12-24 18:38:05 -05:00
Steven Fackler
2ab708c4bc
minor cleanup
2020-12-17 20:36:15 -05:00
zach-com
9856c7b87a
Replace impl From
block
2020-12-17 17:55:22 -05:00
zach-com
f655c3b74c
Address pull request comments
2020-12-16 15:26:06 -05:00
zach-com
07d9fb2ed6
Support connection validation with timeout
2020-12-11 13:47:39 -05:00
Kirill Fomichev
5099799166
return used features
2020-12-01 19:03:02 +03:00
Kirill Fomichev
fa8fb83ec8
Fix tokio features for runtime feature in the docs
2020-12-01 18:20:37 +03:00
dependabot-preview[bot]
235dfeb95a
Update pin-project-lite requirement from 0.1 to 0.2
...
Updates the requirements on [pin-project-lite](https://github.com/taiki-e/pin-project-lite ) to permit the latest version.
- [Release notes](https://github.com/taiki-e/pin-project-lite/releases )
- [Changelog](https://github.com/taiki-e/pin-project-lite/blob/master/CHANGELOG.md )
- [Commits](https://github.com/taiki-e/pin-project-lite/compare/v0.1.0...v0.2.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-17 13:29:23 +00:00
Steven Fackler
5ad3c9a139
Add back keepalives config handling
...
Also fix connection timeouts to be per-address
2020-11-05 21:14:56 -05:00
Steven Fackler
bbf31696bb
Cleanups
2020-10-27 19:45:55 -04:00
Bernardo Uriarte Blanco
996f063380
map to convert to &dyn ToSql
is not longer necessary
2020-10-27 20:31:15 +01:00
Bernardo Uriarte Blanco
0e494a08a9
change rest of *_raw
methods to use BorrowToSql
2020-10-27 18:08:23 +01:00
Bernardo Uriarte Blanco
0eab5fad70
make iterators from &dyn ToSql
or T: ToSql
work as parameters
2020-10-26 20:59:28 +01:00
dependabot-preview[bot]
6561d8129a
Update env_logger requirement from 0.7 to 0.8
...
Updates the requirements on [env_logger](https://github.com/env-logger-rs/env_logger ) to permit the latest version.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases )
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/master/CHANGELOG.md )
- [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.7.0...v0.8.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-19 13:23:29 +00:00
Steven Fackler
12e2f03b53
Release tokio-postgres v0.6.0
2020-10-17 15:06:10 -04:00
Steven Fackler
2689070d19
Upgrade to tokio 0.3
2020-10-17 09:49:45 -04:00
Nikhil Benesch
bb961edcc4
Disable chrono's "oldtime" feature to drop time v0.1
...
The latest version of chrono, v0.4.16, permits removing its dependency
on the long-deprecated time v0.1 crate by disabling the "oldtime"
feature.
For backwards compatibility, chrono is leaving the "oldtime" feature on
by default, so disabling the "oldtime" feature requires disabling all
default features and then re-enabling the one default feature ("clock")
that rust-postgres needs.
Note that this change does not cause any backwards-compatibility
problems for users of rust-postgres. The "oldtime" feature controls only
whether `time_v01::Duration` and `chrono::Duration` are the same type
and does not affect any of the APIs used by rust-postgres.
2020-09-25 15:36:51 -04:00
Juan Aguilar Santillana
a2ca75e9c4
Prettify host
cast as str
2020-09-20 10:43:22 +00:00
Juan Aguilar Santillana
391a54aea1
Avoiding get reference of a u16
2020-09-20 10:37:15 +00:00
Joshua Nelson
61f6e3e5c4
Add newline before DETAIL and HINT
2020-08-01 11:12:22 -04:00
Joshua Nelson
ce7ce310b9
Give a more helpful message on error
...
Before:
```
database error: ERROR: insert or update on table "owner_rels" violates foreign key constraint "owner_rels_cid_fkey"
```
After:
```
database error: ERROR: insert or update on table "owner_rels" violates foreign key constraint "owner_rels_cid_fkey"
DETAIL: Key (cid)=(4) is not present in table "releases".
```
2020-07-31 20:59:57 -04:00
Nikhil Benesch
a30f0b6c05
Use checked arithmetic when decoding into chrono types
...
This avoids an overflow panic if the timestamp is the special "infinity"
or "-infinity" value and produces an error instead.
Fix #640 .
2020-07-30 22:52:56 -04:00
Steven Fackler
bc682b3103
Explicitly terminate the connection in sync API
...
Closes #613
2020-07-27 21:42:02 -04:00