toncenter / ton-indexer

TON Indexer system to store and serve blockchain data using SQL-database
https://toncenter.com/api/v3/
GNU General Public License v3.0
69 stars 33 forks source link

one PostgreSQL multiple index workers support #72

Closed vataops closed 4 months ago

vataops commented 4 months ago

Is it okay for multiple index-workers to connect to a single PostgreSQL database? For example, I want to know if workers have a feature like Upsert

dungeon-master-666 commented 4 months ago

Yes, currently all inserts have "ON CONFLICT" clause and it should work. However, you might face Postgres errors related to deadlocks since multiple clients insert the same data into it.

vataops commented 4 months ago

@dungeon-master-666 thank u!