Skip to content

Commit

Permalink
Merge pull request #103 from dlucredativ/fix_postgres_scan
Browse files Browse the repository at this point in the history
Use stable scan query
  • Loading branch information
Snawoot authored Aug 5, 2023
2 parents c647342 + 7a175e2 commit 14d7344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion postfix_mta_sts_resolver/postgres_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async def scan(self, token, amount_hint):

async with self._pool.acquire(timeout=self._timeout) as conn, conn.transaction():
res = await conn.fetch('SELECT id, ts, pol_id, pol_body, domain FROM '
'sts_policy_cache WHERE id >= $1 LIMIT $2',
'sts_policy_cache WHERE id >= $1 ORDER BY id ASC LIMIT $2',
token, amount_hint)
if res:
result = []
Expand Down

0 comments on commit 14d7344

Please sign in to comment.