pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Vacuum freeze help
2+ messages / 2 participants
[nested] [flat]

* Vacuum freeze help
@ 2016-08-30 12:09  Ben Kammer <b_a_kammer@yahoo.co.uk>
  0 siblings, 1 reply; 2+ messages in thread

From: Ben Kammer @ 2016-08-30 12:09 UTC (permalink / raw)
  To: pgsql-admin

Hello,
I have a postgresql 9.5.4 cluster and was testing with vacuum freeze. I expected the value of xmin to be set to '2' when I vacuum a particular table with the VACUUM FREEZE command. But for some reason this doesn't happen. Here is my small test:
test=# create table t1 (col1 int, col2 int);CREATE TABLEtest=# insert into t1 values (1,2), (3,4);INSERT 0 2test=# select xmin, xmax, * from t1; xmin | xmax | col1 | col2 ------+------+------+------ 1845 |    0 |    1 |    2 1845 |    0 |    3 |    4(2 rows)
test=# vacuum freeze t1;VACUUMtest=# select xmin, xmax, * from t1; xmin | xmax | col1 | col2 ------+------+------+------ 1845 |    0 |    1 |    2 1845 |    0 |    3 |    4(2 rows) As you can see from the results of the last select statement the value of xmin is 1845 instead of 2 which I expected it to be. On my 9.0 cluster this works fine. Has this behavior of postgresql been changed since 9.0? Can anyone explain this?

Ben.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Vacuum freeze help
@ 2016-08-30 12:30  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Ben Kammer <b_a_kammer@yahoo.co.uk>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2016-08-30 12:30 UTC (permalink / raw)
  To: Ben Kammer <b_a_kammer@yahoo.co.uk>; +Cc: pgsql-admin

Ben Kammer <b_a_kammer@yahoo.co.uk> writes:
> I have a postgresql 9.5.4 cluster and was testing with vacuum freeze. I
> expected the value of xmin to be set to '2' when I vacuum a particular
> table with the VACUUM FREEZE command.

That doesn't happen anymore; freezing just sets an info bit that indicates
that the xmin should be treated as old.

			regards, tom lane


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-08-30 12:30 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-08-30 12:09 Vacuum freeze help Ben Kammer <b_a_kammer@yahoo.co.uk>
2016-08-30 12:30 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox