Getting following error in using cursor to fetch the records from alarge table in c language

Поиск
Список
Период
Сортировка
От M Tarkeshwar Rao
Тема Getting following error in using cursor to fetch the records from alarge table in c language
Дата
Msg-id VI1PR0701MB2718C0817F667E16FDB74D9CAE600@VI1PR0701MB2718.eurprd07.prod.outlook.com
обсуждение исходный текст
Ответы Re: Getting following error in using cursor to fetch the recordsfrom a large table in c language  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-general

Hi all,

 

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.

 

Sample Code snippet used

 

        theCursorDec = (RWCString)"DECLARE " +  mySqlCursor + " CURSOR FOR " + theSql;

        myFetchSql = "FETCH " + fetchStr + " IN " + mySqlCursor;

 

        // Begin the cursor

        PQexec(connection, ,"BEGIN"))

        PQexec(connection, ,"myFetchSql”)

 

        // Fetch records from the cursor. Getting First N tuples

        mySqlResultsPG = PQexec(connection,myFetchSql);

        if(PQresultStatus(mySqlResultsPG) == PGRES_TUPLES_OK)

        {

                myNumColumns = PQnfields(mySqlResultsPG);

                ntuples = PQntuples(mySqlResultsPG);

                myTotalNumberOfRowsInQueryResult = ntuples;

                myCurrentRowNum = 0 ;

        }

 

Regards

Tarkeshwar

 

В списке pgsql-general по дате отправления:

Предыдущее
От: rihad
Дата:
Сообщение: Upgrade procedure
Следующее
От: Francisco Olarte
Дата:
Сообщение: Re: Upgrade procedure