14 Commits

Author SHA1 Message Date
Jack Christensen
908c439317 Use stdlib context 2017-03-03 16:01:06 -06:00
Jack Christensen
e53f739cbd Add STRESS_FACTOR to stress tests 2017-03-03 15:54:06 -06:00
Jack Christensen
70f04f227e Remove long TLS stress test
This was used to check that over 512 MB could be read over a TLS connection.
This previously could fail due to SSL renegotiation. But now pgx explicitly
disables renegotiation when connecting to the PostgreSQL server. Also, the Go
TLS library now supports limited renegotiation. And Amazon Redshift was the
only target that this mattered on, and it now supports disabling
renegotiation. So removing this long running and no longer needed test.
2017-03-03 15:45:42 -06:00
Jack Christensen
eb484e1368 TestStressConnPool now runs for X iterations
...instead of T time. Also run in parallel.
2017-03-03 15:44:17 -06:00
Jack Christensen
11b82b3ca4 msgReader implemented in terms of ChunkReader
This should substantially reduce memory allocations and memory copies.

It also means that PostgreSQL messages are always entirely buffered in memory
before processing begins. This simplifies the message processing code.

In particular, Conn.WaitForNotification is dramatically simplified by this
change.
2017-02-13 20:45:42 -06:00
Jack Christensen
048a75406f Fix context query cancellation
Previous commits had a race condition due to not waiting for the PostgreSQL
server to close the cancel query connection. This made it possible for the
cancel request to impact a subsequent query on the same connection. This
commit sets a flag that a cancel request was made and blocks until the
PostgreSQL server closes the cancel connection.
2017-02-11 19:53:18 -06:00
Jack Christensen
14eedb4fca Add ConnPool context methods 2017-02-06 18:54:49 -06:00
Jack Christensen
1ad4c0090a Add ConnPool Prepare and Deallocate
fixes #68
2016-03-04 16:26:27 -06:00
Jack Christensen
8577dccd65 Make ConnPoll stress test time based
Test now runs for fixed amount of time instead of a fixed number of iterations.
This should enable TravisCI to finish the test.
2015-12-12 17:35:24 -06:00
Jack Christensen
d84ee5c18a Remove dead code 2015-12-12 13:20:44 -06:00
Jack Christensen
f004f0802c Add ConnPool.Reset method
refs #110
2015-12-12 13:15:14 -06:00
Jack Christensen
60cca3de7d Disable SSL renegotiation
fixes #103
2015-10-26 12:07:54 -05:00
Jack Christensen
3857bab52e Add query close early to pool stress test 2015-09-26 13:19:00 -05:00
Jack Christensen
e315754b1f Add stress test to connection pool 2015-09-26 13:12:53 -05:00