Skip to content

Commit

Permalink
fix: reduce chunk size to 3000
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Nov 12, 2023
1 parent df000b5 commit 9556148
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pg/pg-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ export class PgStore extends BasePgStore {
currentBlockHeight: currentBlockHeight,
newBlockHeight: block_height,
});
// Divide insertion array into chunks of 4000 in order to avoid the postgres limit of 65534
// Divide insertion array into chunks of 3000 in order to avoid the postgres limit of 65534
// query params.
for (const writeChunk of chunkArray(writes, 4000))
for (const writeChunk of chunkArray(writes, 3000))
await this.insertInscriptions(writeChunk);
updatedBlockHeightMin = Math.min(updatedBlockHeightMin, event.block_identifier.index);
if (ENV.BRC20_BLOCK_SCAN_ENABLED)
Expand Down

0 comments on commit 9556148

Please sign in to comment.