Skip to content

Commit 33721d7

Browse files
fix: parallel workers postgres fix
1 parent cc0a19d commit 33721d7

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,24 @@ docker compose logs -f index-service
167167

168168
:information_source: _Index creation can take several hours but significantly speeds up queries for transactions by address and asset lookups. See [Index Service Documentation](./packages/index-service/README.md) for details on created indexes, customization, and best practices._
169169

170+
### PostgreSQL 17 Configuration (Custom Deployments)
171+
172+
If you are running a custom PostgreSQL 17 deployment (not using our docker-compose), add the following to your `postgresql.conf` to prevent query backlog under concurrent load:
173+
174+
```
175+
max_parallel_workers_per_gather = 0
176+
```
177+
178+
Or apply it at runtime:
179+
```sql
180+
ALTER SYSTEM SET max_parallel_workers_per_gather = 0;
181+
```
182+
```sql
183+
SELECT pg_reload_conf();
184+
```
185+
186+
This is applied automatically when using our docker-compose stack.
187+
170188
### Check Cardano DB sync progress
171189
Use the GraphQL Playground in the browser at http://localhost:3100/graphql:
172190
> **_Note_** This Query is not available in early Era's of Cardano.

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
- POSTGRES_USER_FILE=/run/secrets/postgres_user
1111
ports:
1212
- ${POSTGRES_PORT}:${POSTGRES_PORT}
13-
command: -p ${POSTGRES_PORT}
13+
command: -p ${POSTGRES_PORT} -c max_parallel_workers_per_gather=0
1414
secrets:
1515
- postgres_db
1616
- postgres_password

0 commit comments

Comments
 (0)