Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Setting hot standby feedback for a specific query in PostgreSQL

$
0
0

I'm an R programmer trying to pull data from a PostgreSQL database for analysis, but started getting this error.

ERROR: canceling statement due to conflict with recovery DETAIL: User query might have needed to see row versions that must be removed.

Looking around on here, seems like this is because the rows are changing as they are being queried, and the proposed solution by most answers is to use hot_standby_feedback=on. However, this seems to be a server setting, and not something I can set for that specific query. My question is, is there a way that I can enable this setting for my specific query? I found the BEGIN TRANSACTION commands here and tried them with READ UNCOMMITTED (at the suggestion of another online answer), but didn't work. Meaning, I started the query with: BEGIN TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>