We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e84957a commit 94ca291Copy full SHA for 94ca291
src/databases/Postgres.ts
@@ -113,7 +113,7 @@ export class Postgres implements IDatabase {
113
114
pendingQueries.push(savePromiseState(lastPool.query({ text: query, values: params })));
115
const currentPromises = [...pendingQueries];
116
- if (options.useReplica) currentPromises.push(savePromiseState(timeoutPomise(this.config.postgresReadOnly.readTimeout)));
+ if (options.useReplica && maxTries() - tries > 1) currentPromises.push(savePromiseState(timeoutPomise(this.config.postgresReadOnly.readTimeout)));
117
const queryResult = await nextFulfilment(currentPromises);
118
119
switch (type) {
0 commit comments