28 Commits

Author SHA1 Message Date
Jack Christensen
0d7b0dddea Add test for non-blocking IO preventing deadlock 2022-06-25 13:15:05 -05:00
Jack Christensen
79d68d23d3 Release CopyFrom buf when done 2022-06-18 18:23:24 -05:00
Jack Christensen
60ecdda02e Add true non-blocking IO 2022-06-18 11:51:59 -05:00
Jack Christensen
afa702213f More TLS support 2022-06-04 20:10:23 -05:00
Jack Christensen
09c64d8cf3 Rename nbbconn to nbconn 2022-06-04 09:05:50 -05:00
Jack Christensen
f1df39a29d Initial passing tests 2022-06-04 08:58:05 -05:00
Jack Christensen
ea3cdab234 Fix connect timeout 2022-06-04 08:38:57 -05:00
Jack Christensen
ca22396789 wip 2022-06-02 19:32:55 -05:00
Jack Christensen
7d04dc5caa Fix broken test 2022-05-28 19:43:23 -05:00
Jack Christensen
1f7a855b2e initial not quite working non-blocking conn 2022-05-28 18:13:47 -05:00
Jack Christensen
bfaea9e7ec Fix rare race in CopyFrom 2022-05-24 08:26:37 -05:00
Jack Christensen
b74c109f61 Optimize tracing
The addition of tracing caused messages to escape to the heap. By
avoiding interfaces the messages no longer escape.
2022-05-21 17:22:58 -05:00
Jack Christensen
f2e96156a0 Add message tracing 2022-05-21 14:43:04 -05:00
Jack Christensen
5714896b10 Restructure sending messages
Use an internal buffer in pgproto3.Frontend and pgproto3.Backend instead
of directly writing to the underlying net.Conn. This will allow tracing
messages as well as simplify pipeline mode.
2022-05-21 11:06:44 -05:00
Jack Christensen
d9622f438d Merge remote-tracking branch 'pgconn/master' into v5-dev 2022-04-28 08:01:26 -05:00
Jack Christensen
c323ab6662 Merge remote-tracking branch 'pgconn/master' into v5-dev 2022-04-23 10:48:44 -05:00
Jack Christensen
f27178ba85 Initial privatization of stmtcache
ConnConfig.BuildStatementCache is pending removal once connections
always have separate caches for prepared and described statements.
2022-03-12 08:35:31 -06:00
Jack Christensen
e641d0a5ad Reuse connection read buffer
To avoid extra copies and small allocations previously large
read buffers were allocated and never reused. However, the down side of
this was greater total memory allocation and the possibility that a
reference to a single byte could pin an entire buffer.

Now the buffer is reused.
2022-02-26 09:31:45 -06:00
Jack Christensen
2e0ec225de Make Chunkreader an internal implementation detail 2022-02-26 08:50:46 -06:00
Jack Christensen
d13f651810 Finish importing pgio as internal package 2022-02-21 14:35:20 -06:00
Jack Christensen
032ea5f5c0 Finish import of chunkreader 2022-02-21 14:29:39 -06:00
Jack Christensen
95cbbfe441 Import pgproto3
Also copy in pgmock as an internal package.
2022-02-21 13:22:42 -06:00
Jack Christensen
9c5dfbdfb3 pgconn.CommandTag is now an opaque type
It now makes a copy instead of retaining driver memory. This is in
preparation to reuse the driver read buffer.
2022-02-12 10:26:26 -06:00
Jack Christensen
e2769993cc Merge remote-tracking branch 'pgconn/master' into v5-dev 2022-02-07 11:17:27 -06:00
Jack Christensen
14b5053209 Merge remote-tracking branch 'pgconn/master' into v5-dev 2021-12-18 08:20:53 -06:00
Jack Christensen
72cc95e4dd Bump module version to v5 2021-12-11 13:29:03 -06:00
Jack Christensen
0e293b966c Finish import of pgconn 2021-12-04 14:06:57 -06:00
Jack Christensen
19ec4d505f Import to pgx main repo in pgconn subdir 2021-12-04 13:51:24 -06:00