MVCC and transaction id.
--- a/postgres.rst Wed Jan 02 00:55:00 2019 +0200
+++ b/postgres.rst Wed Jan 02 00:59:05 2019 +0200
@@ -119,7 +119,6 @@
\dy
-
List misc info::
select current_database();
@@ -167,6 +166,15 @@
SELECT relname, relpages FROM pg_class ORDER BY relpages DESC;
+MVCC and transaction id
+=======================
+
+As being MVCC Postgres doesn't delete or update existing rows. Row visibility is controled by
+transaction id (monotonous incremented number): ``xmin`` - first transaction that can see row,
+``xmax`` - last transaction that can see row:::
+
+ SELECT xmin, xmax, * FROM foo WHERE id < 5 ORDER BY id;
+
Using psql client
=================