AW: AW: [HACKERS] Getting OID in psql of recent insert

From: Zeugswetter Andreas SEV <ZeugswetterA(at)wien(dot)spardat(dot)at>
To: "'pgsql-hackers(at)postgreSQL(dot)org'" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: AW: AW: [HACKERS] Getting OID in psql of recent insert
Date: 1999-11-23 08:58:08
Message-ID: 219F68D65015D011A8E000006F8590C603FDC183@sdexcsrv1.f000.d0188.sd.spardat.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> >> Yes, I use 'em the same way. I think an OID is kind of
> like a pointer
> >> in a C program: good for fast, unique access to an object
> within the
> >> context of the execution of a particular application (and maybe not
> >> even that long). You don't write pointers into files to
> be used again
> >> by other programs, though, and in the same way an OID isn't a good
> >> candidate for a long-lasting reference from one table to another.
>
> > I thought this special case is where the new xid access
> method would come
> > in.
>
> Good point, but (AFAIK) you could only use it for tables that you were
> sure no other client was updating in parallel. Otherwise you might be
> updating a just-obsoleted tuple. Or is there a solution for that?

Ok, the fact, that the row changed is known, because we can check the
snapshot. We also know, that the new row must be near the physical end
of the table, so maybe we could do a backward scan ?
Maybe we could also simply bail out, like Oracle with a "snapshot too old"
error message ?
(I know that this is not the same situation as the stated Oracle error)

>
> > Is someone still working on the xid access ?
>
> I think we have the ability to refer to CTID in WHERE now,

Do we use the sql syntax 'where rowid = :xxx' for it,
or do we say 'where ctid = :xxx'.
I would like the rowid naming, because Informix, Oracle (and DB/2 ?) use it.

> but not yet an access method that actually makes it fast...

Well that is of course only half the fun :-(
Could it be done like an index access,
where the first part of the work is skipped, or tunneled through ?

Andreas

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 1999-11-23 09:23:03 RE: [HACKERS] Concurrent VACUUM: first results
Previous Message Tom Lane 1999-11-23 07:10:39 VACUUM as a denial-of-service attack