Does Postgres support bookmarks (tuples ids)?

From: Konstantin Izmailov <pgfizm(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Does Postgres support bookmarks (tuples ids)?
Date: 2010-12-01 05:50:23
Message-ID: AANLkTi=YBUXeuf5QHsaVoWTeCYRaynRdjWgdgDQZ61gu@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear experts,
I've noticed that commercial databases (e.g. SQLServer) and some open source
databases (e.g. Cubrid) support so called "bookmarks".
As far as I understood, a bookmark allows quickly jump to a row for
retrieval or modification.

Here is scenario that I'm trying to deal with:
A BI/ETL application is querying the Postgres database. The queries return
lots of rows (36 mil), each is about 1KB or larger.
So I'm using DECLARE CURSOR/FETCH to read the rows into a buffer (size is
10000 rows, and I'm freeing memory for oldest rows).
The application may alter or re-read some previously read rows by the row
index.
Problem is: if a row is not in the buffer (freed) the application cannot
resolve row index into row itself.
I considered using a unique key to located the row, but unfortunately some
queries do no allows determining the most unique key.

I'm thinking, is it possible to retrieve/alter row by its index after a
Postgres Cursor have read the row?

The application allows a customer to define DB Schema as well as the
queries, so my code does not have a prior knowledge about DB and queries.
It is supposed to provide a certain API with functions based on row indexes.
The API was initially designed for SQLServer, so the goal is to migrate the
application from SQLServer to Postgres.

Would you recommend a solution?

Thank you
Konstantin

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dann Corbit 2010-12-01 05:57:42 Re: Does Postgres support bookmarks (tuples ids)?
Previous Message Greg Swisher 2010-12-01 05:31:10 Warm Standby log filling up with "FATAL: the database system is starting up" entries