postgres日志文件中的"元组(0,79)"是什么意思发生了死锁?

Hay*_*ate 10 postgresql deadlock database-deadlocks

在postgres日志中:

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;
Run Code Online (Sandbox Code Playgroud)

当我挑起僵局时,我可以看到文字:tuple (0,79).

据我所知,元组只是表中的几行.但我不明白是什么(0,79)意思.我在表帐户中只有2行,它只是游戏和自学应用程序.

(0,79)意味着什么呢?

Vao*_*sun 9

这是系统列ctid的数据类型.元组ID是一对(块号,块内的元组索引),用于标识其表中行的物理位置.

阅读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检查...