Commit Graph

24 Commits (c844a2402bef2bff7616a8cf15c1a6b602a22ec2)

Author SHA1 Message Date
steampunkcoder cba88a4b7d Fix syntax error in replication protocol message issued by StartReplication()
According to https://www.postgresql.org/docs/9.6/static/protocol-replication.html
pluginArguments should be separated by commas and surrounded by parantheses.
2018-02-05 11:12:55 -08:00
Mark Fletcher fd93b83433 Reverted breaking API change to CreateReplicationSlot. Instead, the new version that returns the consistent_point and snapshot_name values is
called CreateReplicationSlotEx().
2017-09-21 09:58:20 -07:00
Mark Fletcher a1e4b1b9b5 Changed CreateReplicationSlot to return the consistent_point and snapshot_name. 2017-09-19 21:12:15 -07:00
Jack Christensen 8f4178b3d3 Use github.com/pkg/errors 2017-06-04 21:30:03 -05:00
Jack Christensen 27ab289096 Use Go casing convention for OID 2017-06-03 11:53:49 -05:00
Jack Christensen 8322171bd8 Remove Rows.Fatal 2017-05-06 09:37:49 -05:00
Jack Christensen 458dd24a9f Remove unneeded WriteBuf 2017-05-02 21:39:23 -05:00
Jack Christensen 280bce7078 Added log adapter for logrus
Also changed standard logger interface to take a map instead of varargs for
extra data.
2017-04-29 21:28:38 -05:00
Jack Christensen f04c58338b Introduce pgproto3 package
pgproto3 will wrap the message encoding and decoding for the PostgreSQL
frontend/backend protocol version 3.
2017-04-29 10:02:38 -05:00
Jack Christensen 5702f34407 Fix replication with context
The normal connection context timeout cancels the current query. That isn't
appropriate for a replication connection.
2017-03-05 14:00:38 -06:00
Jack Christensen c540b65edf Fix leaked contexts 2017-02-16 18:11:30 -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 deac6564ee Implement Query in terms of QueryContext
- Merge Rows.close into Rows.Close
- Merge Rows.abort into Rows.Fatal
2017-02-11 19:16:13 -06:00
Jack Christensen b8fdc38fa8 Only store Conn's *bufio.Reader in msgReader
Confusing and redundant to have the same *bufio.Reader in msgReader
and Conn.
2017-02-09 19:37:23 -06:00
Kris Wehner 1424fb2b42 Add IdentifySystem and TimelineHistory functions, and tighten up the testing 2017-01-30 11:35:48 -08:00
Kris Wehner 41d9c0f338 Add tests for replication slot drop, and go fmt 2017-01-26 18:24:21 -08:00
Kris Wehner af01afca00 Add the drop replication slot functionality 2017-01-09 14:19:08 -08:00
Kris Wehner c88c110169 ReplicationConn refactor 2017-01-09 11:32:02 -08:00
Kris Wehner cf225c8365 Add the ability to set all the fields in the constructor 2017-01-03 13:56:34 -08:00
Kris Wehner dad2c383af Start replication now wraps the sql and returns errors properly 2017-01-03 11:49:13 -08:00
Kris Wehner 2b096a7d08 It should all be unsigned. 2016-12-08 15:26:44 -08:00
Kris Wehner 14497e4c65 Capitalization 2016-12-07 21:19:58 -08:00
Kris Wehner edbd30ea6a Add replication stop mechanism 2016-12-06 15:44:37 -08:00
Kris Wehner 7bbb1c7307 Add basic logical replication protocol support 2016-12-04 21:35:22 -08:00