Commit Graph

49 Commits

Author SHA1 Message Date
Steven Fackler
2d083ec1c8 Release postgres-protocol v0.5.0-alpha.2 2019-11-27 20:32:13 -05:00
Steven Fackler
12c2ef79b6 Upgrade to tokio 0.2/futures 0.3 2019-11-26 16:32:36 -08:00
Brandon W Maister
4a3df873e9 Make all invalid message length errors unique 2019-11-19 10:28:31 -05:00
mibac138
9a83196e23 Update dependencies 2019-10-19 20:34:11 +02:00
Steven Fackler
9ebdca23e1 Release postgres-protocol v0.5.0-alpha.1 2019-10-14 17:46:45 -07:00
Steven Fackler
0736382593 Fix tests 2019-10-12 17:47:55 -07:00
Steven Fackler
ffd7245e54 Use BytesMut for messages
Benchmarks indicate that malloc accounts for a significant amount of the
runtime of queries. The message buffer accounts for ~half of that (the
other being channels), and this change should eliminate it.
2019-10-12 16:30:27 -07:00
Steven Fackler
2cc5bbf21b Inline buffer methods 2019-09-08 16:56:31 -07:00
Steven Fackler
904c951ad6 Release postgres v0.16.0-rc.2 2019-06-29 21:43:50 -07:00
Steven Fackler
47d83d57a0 Release postgres-protocol v0.4.1 2019-06-29 21:06:23 -07:00
Steven Fackler
2d2a5dea81 Send response messages in blocks
Our codec implementation originally just parsed single messages out of
the stream buffer. However, if a query returns a bunch of rows, we're
spending a ton of time shipping those individual messages from the
connection back to the Query stream. Instead, collect blocks of unparsed
messages that are as large as possible and send those back.

This cuts the processing time of the following query in half, from ~10
seconds to ~5:
`SELECT s.n, 'name' || s.n FROM generate_series(0, 9999999) AS s(n)`

At this point, almost all of the remainder of the time is spent parsing
the rows.

cc #450
2019-06-27 21:47:13 -07:00
Steven Fackler
db462eb018 Avoid copies in copy_in
copy_in data was previously copied ~3 times - once into the copy_in
buffer, once more to frame it into a CopyData frame, and once to write
that into the stream.

Our Codec is now a bit more interesting. Rather than just writing out
pre-encoded data, we can also send along unencoded CopyData so they can
be framed directly into the stream output buffer. In the future we can
extend this to e.g. avoid allocating for simple commands like Sync.

This also allows us to directly pass large copy_in input directly
through without rebuffering it.
2019-06-25 18:54:17 -07:00
Steven Fackler
956ba12b54 Conversions from INET to IpAddr
We ignore the netmask when deserializing and use /32 or /128 when
serializing.

Closes #430
2019-04-03 21:30:49 -07:00
Steven Fackler
fd3f3feafc Move types tests to their own file 2019-04-03 20:50:41 -07:00
Steven Fackler
3b31551f73 Upgrade fallible-iterator 2019-03-10 16:32:28 -07:00
Steven Fackler
9385bebefc Release postgres-protocol v0.4.0 2019-03-05 19:09:48 -08:00
Steven Fackler
c619c741be Upgrade md5 2019-03-05 18:59:43 -08:00
Steven Fackler
0de50abc29 Rustfmt 2019-03-04 21:55:37 -08:00
坚坚冰
5c7ddc9c85 Upgrade geo, rand and base64 2019-01-31 14:48:04 +08:00
Steven Fackler
e80e1fcaaf Don't require passwords to be strings in protocol 2018-12-27 17:36:04 -05:00
Steven Fackler
04ce4bb7a1 Run clippy 2018-12-09 21:44:07 -08:00
Steven Fackler
6ff59acdd2 rustfmt 2018-12-08 17:53:30 -08:00
Steven Fackler
6a5f22cd5d Migrate postgres-protocol to 2018 edition 2018-12-08 17:24:38 -08:00
Steven Fackler
a2cac0ef61 Remove tls-unique from blocking postgres crate 2018-11-28 20:42:53 -08:00
Steven Fackler
52dd0b6780 rustfmt 2018-11-28 19:32:29 -08:00
Steven Fackler
05ef00a2a1 Upgrade md5 2018-10-14 16:51:30 -07:00
Steven Fackler
9befbd898f Upgrade digest crates 2018-10-11 09:00:59 -07:00
Steven Fackler
a4bdcb11e4 Overhaul error type 2018-08-15 10:27:34 -07:00
Steven Fackler
7056e3ec24 Copy out support 2018-07-15 19:40:15 -07:00
Steven Fackler
11ffcac087 Support SCRAM channel binding for Postgres 11 2018-06-01 23:07:33 -07:00
Steven Fackler
bfdb557cf2 Automatically determine flags for array serialization
This way it automatically works with versions of postgres that didn't
support null array entries as long as the data doesn't actually have a
null
2018-04-22 19:02:48 -07:00
Steven Fackler
ec7db287e1 Upgrade dependencies 2018-04-15 13:59:48 -07:00
Steven Fackler
0ff73e43b5 Release postgres-protocol 0.3.2 2018-02-11 17:14:02 -08:00
Chris West (Faux)
bcc0996f04 Hmac::new() is infalliable 2018-01-15 18:54:43 +00:00
Chris West (Faux)
91090ef3e3 Upgrade hmac, sha2 and generic_array 2018-01-14 14:48:02 +00:00
Steven Fackler
eaab86f344 Release postgres-protocol 0.3.1 2017-09-12 21:04:59 -04:00
Steven Fackler
c3062b3782 Bump base64 version 2017-09-12 20:45:44 -04:00
Chris West (Faux)
58133f37e1 bump generic-array dependents' versions 2017-09-04 18:22:38 +01:00
Steven Fackler
6a86f8dd85 Rustfmt 2017-06-30 17:35:17 -10:00
Steven Fackler
6cf1eeb457 Release postgres-protocol v0.3.0 2017-06-11 13:02:31 -07:00
Steven Fackler
f892c4b57b try! -> ? 2017-05-22 21:55:51 -07:00
Steven Fackler
f9b864f2da SASL auth support in postgres 2017-05-22 21:09:35 -07:00
Steven Fackler
8fc5ba218b SCRAM-SHA-256 protocol support 2017-05-21 22:20:57 -07:00
Steven Fackler
801835a05b Add new SASL messages to protocol 2017-05-18 21:54:39 -07:00
Steven Fackler
6b008766bf Use the bytes crate for backend message parsing (#253) 2017-05-06 08:28:07 -07:00
Steven Fackler
29cac442dd Release postgres-protocol v0.2.2 2017-05-02 08:53:28 -07:00
Steven Fackler
e34890075a Remove some stray files 2017-03-12 15:20:44 -07:00
Steven Fackler
aaeb74608b Move geo type conversions to postgres-protocol 2017-03-12 15:14:20 -07:00
Steven Fackler
6df3842274 Move postgres-protocol in-tree 2017-03-12 13:46:01 -07:00