Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[columnar] Port in citus freezing code for vacuum #194

Merged
merged 1 commit into from
Nov 7, 2023
Merged

Conversation

JerrySievert
Copy link
Contributor

fixes #192 by porting in fix from citus citusdata/citus#5962

I was not able to get TAP tests working correctly in our source tree, so did not include the TAP test, so here are the steps to reproduce (taken from citusdata/citus#5958):

postgresql.conf

 shared_preload_libraries=citus
 shared_preload_libraries='citus'
 vacuum_freeze_min_age = 50000
 vacuum_freeze_table_age = 50000
 synchronous_commit = off
 fsync = off

psql:

CREATE EXTENSION columnar;
CREATE TABLE test_row(i int);
INSERT INTO test_row VALUES (1);
CREATE TABLE test_col(i int) USING columnar;
INSERT INTO test_col VALUES (1);

bash:

(for i in `seq 1 200000`; do echo "UPDATE test_row SET i = i + 1;"; done) | ./bin/psql -q -X postgres

psql:

select datname, relname, age(datfrozenxid) datage, age(relfrozenxid) as relage from pg_database, pg_class where datname='postgres' and (relname='test_row' or relname='test_col');
vacuum freeze;
select datname, relname, age(datfrozenxid) datage, age(relfrozenxid) as relage from pg_database, pg_class where datname='postgres' and (relname='test_row' or relname='test_col');

@JerrySievert JerrySievert self-assigned this Nov 6, 2023
@JerrySievert JerrySievert merged commit 7ab2bde into main Nov 7, 2023
12 checks passed
@JerrySievert JerrySievert deleted the freezing branch November 7, 2023 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Columnar tables cause txid wraparound
2 participants