Fazool <fazoolmein(at)gmail(dot)com> writes:
> I am implementing some functionality into Postgresql, where I want to
> track which row was accessed by a user query. I am implementing the
> functionality inside Postgres, so that there are no changes required
> on client side (e.g. re-writing queries).
> Rows are identified by OIDs, and I have set default_with_oids=true, so
> that all tables are created with OIDs.
It's a serious, serious error to suppose that OIDs are adequate
identifiers for rows in user tables.
We use OIDs to identify rows in system catalogs. We can get away with
that, more or less, because (a) system catalogs are not likely to
contain billions of rows, and (b) we place a unique index on OID on
every system catalog that has OIDs. Neither of these statements is
very tenable for user tables.
You haven't said anything about what it is you actually need to
accomplish here, but can you use TIDs as row identifiers? What's
the required lifetime of the identifiers?
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Fazool||Date: 2011-09-02 05:58:23|
|Subject: Re: Getting the OID inside the executor|
|Previous:||From: Fazool||Date: 2011-09-02 03:14:27|
|Subject: Getting the OID inside the executor|