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-11-01 06:25:54
Message-ID: VI1PR0701MB27189E75E3F012172E536EF7AE620@VI1PR0701MB2718.eurprd07.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

If VACUUM full is going on and any conflicting query come then what will happen to that query.

Regards
Tarkeshwar

-----Original Message-----
From: M Tarkeshwar Rao
Sent: Thursday, October 31, 2019 12:45 PM
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

When we running with vacuum full we are getting following error message.

Error:
-------
user was holding a relation lock for too long

Any idea about this error.

-----Original Message-----
From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Sent: Thursday, October 31, 2019 12:28 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 Thu, 2019-10-31 at 05:18 +0000, M Tarkeshwar Rao wrote:
[queries get canceled on the standby]
> You are absolutely right. This is the issue with us.
> If we retry the query again. Will it be successful?

Sometimes :^/

> Can you please suggest how to configure hot_standby_feedback?

You set it to "on", then you get no query cancellation because of VACUUM (at the price of potential bloat on the primary server).

Your query can still get canceled by conflichts with ACCESS EXCLUSIVE locks that are taken by TRUNCATE, ALTER/DROP TABLE and similar as well as autovacuum truncation.

Yours,
Laurenz Albe
--
Cybertec | https://protect2.fireeye.com/v1/url?k=a20e6965-fe84a291-a20e29fe-86cd58c48020-fb007d5e5585f41b&q=1&e=c64a1818-0510-4ceb-bd0f-50fdd335f83c&u=https%3A%2F%2Fwww.cybertec-postgresql.com%2F

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daulat Ram 2019-11-01 09:42:50 RE: Barman
Previous Message Олег Самойлов 2019-10-31 22:58:10 logging proxy