Re: Getting following error in using cursor to fetch the recordsfrom a large table in c language - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Getting following error in using cursor to fetch the recordsfrom a large table in c language
Date
Msg-id ee2591e30acd5a74c39d3edd96efd6bc90273e52.camel@cybertec.at
Whole thread Raw
In response to RE: Getting following error in using cursor to fetch the records froma large table in c language  (M Tarkeshwar Rao <m.tarkeshwar.rao@ericsson.com>)
List pgsql-general
M Tarkeshwar Rao wrote:
> 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.

That means that you got a replication conflict, which is to be expected,
because VACUUM (FULL) is also one of the commands that require an
ACCESS EXCLUSIVE lock.

First suggestion: don't use VACUUM (FULL).

Second suggestion: A standby server can *either* be used for high
availability, in which case queries on the standby should be forbidden
or canceled in case of conflicts, *or* it can be used to run resource
intensive reading queries, in which case application of the transaction
log should be delayed.

Don't try to use a standby for both - use two standby servers.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




pgsql-general by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Barman
Next
From: Олег Самойлов
Date:
Subject: logging proxy