What does “tuple (0.79)” mean in the postgres log file when a deadlock occurs?

In the postgres log:

2016-12-23 15:28:14 +07 [17281-351 trns: 4280939, vtrns: 3/20] postgres@deadlocks HINT:  See server log for query details.
2016-12-23 15:28:14 +07 [17281-352 trns: 4280939, vtrns: 3/20] postgres@deadlocks CONTEXT:  while locking tuple (0,79) in relation "account"
2016-12-23 15:28:14 +07 [17281-353 trns: 4280939, vtrns: 3/20] postgres@deadlocks STATEMENT:  SELECT id FROM account where id=$1 for update;

When I do a dead end, I see the text: tuple (0,79).

As I know, a tuple is just a few rows in a table. But I do not understand what it means (0,79). I have only 2 rows in the table, it's just a game and a self-learning application.

So what does it mean (0,79)?

+4
source share
1 answer

This is the ctid system column data type. A tuple identifier is a pair (block number, tuple index within a block) that identifies the physical location of a row in its table.

https://www.postgresql.org/docs/current/static/datatype-oid.html

0, 79

http://rachbelaid.com/introduction-to-postgres-physical-storage/

SELECT id,ctid FROM account where id=$1 $1, ...

+4

Source: https://habr.com/ru/post/1664662/


All Articles