14 Commits

Author SHA1 Message Date
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
c323ab6662 Merge remote-tracking branch 'pgconn/master' into v5-dev 2022-04-23 10:48:44 -05: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
d13f651810 Finish importing pgio as internal package 2022-02-21 14:35:20 -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