Skip to content

Comments

fix: correct issue with database connection#421

Merged
mazzy89 merged 1 commit intofeed-syncfrom
fix/feed-sync-connection
Oct 29, 2025
Merged

fix: correct issue with database connection#421
mazzy89 merged 1 commit intofeed-syncfrom
fix/feed-sync-connection

Conversation

@jeronimoalbi
Copy link
Member

It seems we can't use a connection pool with LogicalReplicationService because it creates the client, and current implementation doesn't allow to customize how clients are created.

This PR also removes the database package because is not needed anymore.

It seems we can't use a connection pool with LogicalReplicationService
because it creates the client, and current implementation doesn't allow
to customize how clients are created.
@jeronimoalbi jeronimoalbi requested a review from mazzy89 October 28, 2025 17:06
@jeronimoalbi jeronimoalbi self-assigned this Oct 28, 2025
@jeronimoalbi jeronimoalbi mentioned this pull request Oct 28, 2025
@mazzy89 mazzy89 merged commit 585a811 into feed-sync Oct 29, 2025
@mazzy89 mazzy89 deleted the fix/feed-sync-connection branch October 29, 2025 07:57
alanrsoares pushed a commit that referenced this pull request Nov 5, 2025
* feat: log insert event from pg

* fix: remove unused port

* chore: add `vite-node` to dev dependencies

* chore: import pg Pool type for typing

* feat: create slot

* fix: correct issue with database connection (#421)

It seems we can't use a connection pool with LogicalReplicationService
because it creates the client, and current implementation doesn't allow
to customize how clients are created.

* test: add initial tests support and feed service tests

* ci: fix issue introduced by last merge

* feat: change Docker compose to enable PostgreSQL replication

* feat: change Docker compose to setup PostgreSQL replication

* feat: add message publisher abstraction with console publisher

* feat: improve postgres replication setup

This change address specific replication to avoid growing the WAL with
data that won't be needed.

* chore: change console publisher to serialize to JSON

* test: fix bropken publisher unit test

* feat: change feed replication service to use a message publisher

* test: fix broken feed service unit tests

* feat: automatically create slot & publication if needed on start

* chore: rename setup publication to ensure publication

* chore: remove debug line

* feat: support replaying feed posts

Replaying can be done by setting REPLAY_POSTS env variable.

This implementation doesn't handle potential duplications between the
feed table records and the WAL.

* chore: change config properties to camel case

* chore: simplify feed replication service

* chore: update wal timeouts in PostgreSQL config

* feat: support publishing new posts to Telegram

* feat: add SIGINT and SIGTERM support to main

This is required to be container friendly

* chore: move fixed service requirements inside feed replication class

* feat: add logging support

Also removed tests because right now there are no relevant tests.

* chore: add info log when a post is published successfully

* chore: add config documentation and replay filter settings

* feat: support replaying posts starting from a timestamp and hash

* feat: throttle Telegram messages to respect API limits

* chore: change publisher to use generics

---------

Co-authored-by: jeronimoalbi <894299+jeronimoalbi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants