RE: Getting following error in using cursor to fetch the records from a large table in c language

From: M Tarkeshwar Rao <m(dot)tarkeshwar(dot)rao(at)ericsson(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: RE: Getting following error in using cursor to fetch the records from a large table in c language
Date: 2019-10-31 05:18:45
Message-ID: VI1PR0701MB2718C6993AB35332B933B3EDAE630@VI1PR0701MB2718.eurprd07.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Laurenz,

You are absolutely right. This is the issue with us.
If we retry the query again. Will it be successful?

Can you please suggest how to configure hot_standby_feedback?

Regards
Tarkeshwar

-----Original Message-----
From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Sent: Wednesday, October 30, 2019 11:20 PM
To: M Tarkeshwar Rao <m(dot)tarkeshwar(dot)rao(at)ericsson(dot)com>; 'pgsql-general(at)postgresql(dot)org' <pgsql-general(at)postgresql(dot)org>
Subject: Re: Getting following error in using cursor to fetch the records from a large table in c language

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message M Tarkeshwar Rao 2019-10-31 05:21:06 Can you please suggest how to configure hot_standby_feedback?
Previous Message Mitar 2019-10-30 23:05:34 Re: Automatically parsing in-line composite types