Commit Graph

31 Commits (6b52e0b5e07f9e201fa074d3abfad7dd9541af2b)

Author SHA1 Message Date
Jack Christensen 6b52e0b5e0 Contributing guide now includes instructions to test client ssl auth 2022-10-29 19:00:29 -05:00
Jack Christensen 1ec3816a20 pgconn and pgproto use same environment variable for tests as pgx 2022-10-29 13:23:25 -05:00
Jack Christensen c9c166b8b2 Fix TestConnCopyFromDataWriteAfterErrorAndReturn always being skipped 2022-10-29 13:17:52 -05:00
Jack Christensen 9a207178f6 Fix TestConnCheckConn always being skipped 2022-10-29 13:16:05 -05:00
Jack Christensen 305c4ddbc7 Move and rename test 2022-10-01 10:09:57 -05:00
Jack Christensen fb83fb0cc3 Skip TestCopyFrom on CockroachDB 2022-10-01 10:08:03 -05:00
Tommy Reilly c48dd7e1f8 Add a test case demonstrating I/O race with CopyFrom 2022-10-01 10:07:38 -05:00
Jack Christensen cd8b29b0fe Fix flickering on TestConnectTimeoutStuckOnTLSHandshake
Ensure that even if the outer function finishes the goroutine can still
send an error.
2022-09-24 12:54:59 -05:00
Jack Christensen 782133158f Test sending CopyData before CopyFrom responds with error 2022-09-03 09:31:41 -05:00
Jack Christensen ae65a8007b Use higher pgconn.FieldDescription with string Name
Instead of using pgproto3.FieldDescription through pgconn and pgx. This
lets the lowest level pgproto3 still be as memory efficient as possible.

https://github.com/jackc/pgx/pull/1281
2022-08-20 10:04:18 -05:00
Jack Christensen dbee461dc9 Update previous pgconn merge for v5 2022-08-19 17:42:04 -05:00
Jack Christensen ef5655c563 Merge remote-tracking branch 'pgconn/master' into v5-dev 2022-08-19 17:36:29 -05:00
Jack Christensen 8f0c9557e4 Merge remote-tracking branch 'pgconn/master' into v5-dev 2022-08-06 06:33:10 -05:00
Jack Christensen ba58e3d5d2 Fix pipeline prepare query without row results 2022-07-09 08:32:12 -05:00
Jack Christensen a86f4f3db9 Add deallocate to pipeline mode 2022-07-07 19:32:01 -05:00
Jack Christensen f635b43a6b Use bigint in tests for CockroachDB compatibility
CRDB automatically changes int4 to int8.
2022-07-02 22:00:42 -05:00
Jack Christensen ae2881a23c Add pipeline mode to pgconn 2022-07-02 21:48:16 -05:00
Jack Christensen 26eda0f86d Check for ENV conn string and skip test if missing 2022-06-25 16:55:09 -05:00
Jack Christensen 72b1dcff2f Add pgconn.CheckConn 2022-06-25 15:55:09 -05:00
Jack Christensen b068d53753 Fix race in test
Goroutine should have it's own err var instead of sharing.
2022-06-25 14:07:48 -05:00
Jack Christensen 125ee9670e Test TLS connection with pg_stat_ssl
Because of the nbconn wrapper it is no longer possible to check if the
conn is a *tls.Conn directly. This is actually a more reliable test
anyway.
2022-06-25 13:43:16 -05:00
Jack Christensen 811d855a35 Add non-blocking IO
This eliminates an edge case that can cause a deadlock and is a
prerequisite to cheaply testing connection liveness and to recoving a
connection after a timeout.

https://github.com/jackc/pgconn/issues/27

Squashed commit of the following:

commit 0d7b0dddea
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat Jun 25 13:15:05 2022 -0500

    Add test for non-blocking IO preventing deadlock

commit 79d68d23d3
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat Jun 18 18:23:24 2022 -0500

    Release CopyFrom buf when done

commit 95a43139c7
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat Jun 18 18:22:32 2022 -0500

    Avoid allocations with non-blocking write

commit 6b63ceee07
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat Jun 18 17:46:49 2022 -0500

    Simplify iobufpool usage

commit 60ecdda02e
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat Jun 18 11:51:59 2022 -0500

    Add true non-blocking IO

commit 7dd26a34a1
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat Jun 4 20:28:23 2022 -0500

    Fix block when reading more than buffered

commit afa702213f
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat Jun 4 20:10:23 2022 -0500

    More TLS support

commit 51655bf8f4
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat Jun 4 17:46:00 2022 -0500

    Steps toward TLS

commit 2b80beb1ed
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat Jun 4 13:06:29 2022 -0500

    Litle more TLS support

commit 765b2c6e7b
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat Jun 4 12:29:30 2022 -0500

    Add testing of TLS

commit 5b64432afb
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat Jun 4 09:48:19 2022 -0500

    Introduce testVariants in prep for TLS

commit ecebd7b103
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat Jun 4 09:32:14 2022 -0500

    Handle and test read of previously buffered data

commit 09c64d8cf3
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat Jun 4 09:04:48 2022 -0500

    Rename nbbconn to nbconn

commit 73398bc67a
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat Jun 4 08:59:53 2022 -0500

    Remove backup files

commit f1df39a29d
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat Jun 4 08:58:05 2022 -0500

    Initial passing tests

commit ea3cdab234
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat Jun 4 08:38:57 2022 -0500

    Fix connect timeout

commit ca22396789
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Thu Jun 2 19:32:55 2022 -0500

    wip

commit 2e7b46d5d7
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Mon May 30 08:32:43 2022 -0500

    Update comments

commit 7d04dc5caa
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat May 28 19:43:23 2022 -0500

    Fix broken test

commit bf1edc77d7
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat May 28 19:40:33 2022 -0500

    fixed putting wrong size bufs

commit 1f7a855b2e
Author: Jack Christensen <jack@jackchristensen.com>
Date:   Sat May 28 18:13:47 2022 -0500

    initial not quite working non-blocking conn
2022-06-25 13:15:31 -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 2e0ec225de Make Chunkreader an internal implementation detail 2022-02-26 08:50:46 -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