From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | AI Rumman <rummandba(at)gmail(dot)com>, pgsql-general General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: not finding rows using ctid |
Date: | 2014-08-07 20:51:43 |
Message-ID: | 53E3E6DF.9090303@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 08/07/2014 12:40 PM, AI Rumman wrote:
>
> Hi,
>
> I am getting the logs as follows:
>
> LOG: process 32145 acquired ExclusiveLock on tuple (153420,5) of
> relation 663326 of database 475999 after 1123.028 ms
>
>
> But, when I am executing sqls to find the row on that table using the
> ctid = '(153420,5)', I get no rows.
>
>
> Any idea, why?
http://www.postgresql.org/docs/9.3/static/ddl-system-columns.html
"ctid
The physical location of the row version within its table. Note
that although the ctid can be used to locate the row version very
quickly, a row's ctid will change if it is updated or moved by VACUUM
FULL. Therefore ctid is useless as a long-term row identifier. The OID,
or even better a user-defined serial number, should be used to identify
logical rows."
Something changed the row between the time you saw it in the log and the
time you did the query.
>
>
> Thanks.
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | David G Johnston | 2014-08-07 21:12:12 | Re: dump/restore with a hidden dependency? |
Previous Message | Gregory Taylor | 2014-08-07 19:54:54 | Re: Recursive CTE trees + Sorting by votes |