Giter VIP home page Giter VIP logo

psql-streamer's People

Contributors

blind-oracle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

psql-streamer's Issues

old values in the update event

in case of update events sometimes it's useful to know which row is updated.
currently only new values will be stored in the event struct:

case pgoutput.Insert:
ev, err = s.generateEvent(event.ActionInsert, v.RelationID, v.Row)
case pgoutput.Update:
ev, err = s.generateEvent(event.ActionUpdate, v.RelationID, v.Row)

possible timeout occured on pgx connection

I have many errors in log like:

2021/09/27 00:47:25.613785 Source-PSQL (db1): Replication error (walPositionPersisted: 290579576): replication failed: nil message received, should not happen

And in postgresql logs:

021-09-26 22:01:08.808 UTC [1834] ERROR:  replication slot "db1" already exists
2021-09-26 22:01:08.814 UTC [1834] LOG:  starting logical decoding for slot "db1"
2021-09-26 22:01:08.814 UTC [1834] DETAIL:  Streaming transactions committing after 0/14AC5220, reading WAL from 0/14BA1F70.
2021-09-26 22:01:08.815 UTC [1834] LOG:  logical decoding found consistent point at 0/14BA1F70
2021-09-26 22:01:08.815 UTC [1834] DETAIL:  There are no running transactions.
2021-09-26 22:01:21.908 UTC [1844] ERROR:  replication slot "db1" already exists
2021-09-26 22:01:21.913 UTC [1844] LOG:  starting logical decoding for slot "db1"
2021-09-26 22:01:21.913 UTC [1844] DETAIL:  Streaming transactions committing after 0/14AC5220, reading WAL from 0/14BA1F70.
2021-09-26 22:01:21.914 UTC [1844] LOG:  logical decoding found consistent point at 0/14BA1F70
2021-09-26 22:01:21.914 UTC [1844] DETAIL:  There are no running transactions.

The investigation leads me to Start method of Subscription struct in pgoutput package: https://github.com/blind-oracle/pgoutput/blob/master/sub.go#L98 which calls from https://github.com/blind-oracle/psql-streamer/blob/master/source/postgres/postgres.go#L286

It looks like psql-streamer breaks a connection to database but I'm not sure. Or pgx does it.
Have you seen an error similar to mine? How did you solve it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.