Freezing is not WAL-logged - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Freezing is not WAL-logged
Date
Msg-id 45362E84.1060107@enterprisedb.com
Whole thread Raw
Responses Re: Freezing is not WAL-logged
List pgsql-bugs
I just noticed that freezing a tuple (in vacuumlazy.c) is not
WAL-logged. That leads to this scenario:

postgres=# CREATE TABLE foo (bar int);
CREATE TABLE
postgres=# INSERT INTO foo VALUES (1);
INSERT 0 1
postgres=# SELECT xmin,xmax, bar FROM foo;
  xmin | xmax | bar
------+------+-----
   669 |    0 |   1
(1 row)

postgres=# VACUUM FREEZE foo;
VACUUM

  killall -9 postgres + restart

postgres=# SELECT xmin,xmax, bar FROM foo;
  xmin | xmax | bar
------+------+-----
   669 |    0 |   1
(1 row)

postgres=# SELECT relminxid FROM pg_class WHERE relname='foo';
  relminxid
-----------
        672
(1 row)

It looks like a bug to me.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

pgsql-bugs by date:

Previous
From: Cristian Ionescu
Date:
Subject: hello
Next
From: "Janos Gonda"
Date:
Subject: BUG #2707: file size at the end of the large object