From: Laurenz Albe <laurenz.albe@cybertec.at>
To: M Tarkeshwar Rao <m.tarkeshwar.rao@ericsson.com>
To: 'pgsql-general@postgresql.org' <pgsql-general@postgresql.org>
Subject: Re: Getting following error in using cursor to fetch the records from a large table in c language
Date: Wed, 30 Oct 2019 18:50:28 +0100
Message-ID: <1aae112c37776a169fe2e73fdaba8be84b9f3ebf.camel@cybertec.at> (raw)
In-Reply-To: <VI1PR0701MB2718C0817F667E16FDB74D9CAE600@VI1PR0701MB2718.eurprd07.prod.outlook.com>
References: <VI1PR0701MB2718C0817F667E16FDB74D9CAE600@VI1PR0701MB2718.eurprd07.prod.outlook.com>
On Wed, 2019-10-30 at 16:59 +0000, M Tarkeshwar Rao wrote:
> Getting following error in using cursor to fetch the records from a large table in c language.
> Can you please suggest why it is coming and what is the remedy for this.
>
> Error Details
> -----------------
> Failed to execute the sql command close:
> mycursor_4047439616_1571970686004430275FATAL: terminating connection due to conflict with recovery
> DETAIL: User query might have needed to see row versions that must be removed.
> HINT: In a moment you should be able to reconnect to the database and repeat your command.
This is not a proble with your program.
Your query is running against a standby server with "hot_standby" on,
and there are conflicts between replication and your query.
If you increase "max_standby_streaming_delay" in "postgresql.conf" on
the standby, your query will be given more time to complete.
This will, however, cause replay of the replicated changes to be delayed.
Yours,
Laurenz Albe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, m.tarkeshwar.rao@ericsson.com
Subject: Re: Getting following error in using cursor to fetch the records from a large table in c language
In-Reply-To: <1aae112c37776a169fe2e73fdaba8be84b9f3ebf.camel@cybertec.at>
References: <VI1PR0701MB2718C0817F667E16FDB74D9CAE600@VI1PR0701MB2718.eurprd07.prod.outlook.com> <1aae112c37776a169fe2e73fdaba8be84b9f3ebf.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox