From: | Arseny Sher <a(dot)sher(at)postgrespro(dot)ru> |
---|---|
To: | "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>, Alexander Lakhin <a(dot)lakhin(at)postgrespro(dot)ru> |
Subject: | Too rigorous assert in reorderbuffer.c |
Date: | 2019-01-31 06:21:59 |
Message-ID: | 874l9p8hyw.fsf@ars-thinkpad |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
My colleague Alexander Lakhin has noticed an assertion failure in
reorderbuffer.c:1330. Here is a simple snippet reproducing it:
SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding');
create table t(k int);
begin;
savepoint a;
alter table t alter column k type text;
rollback to savepoint a;
alter table t alter column k type bigint;
commit;
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
It is indeed too opinionated since cmax of a tuple is not stable; it can
be rewritten if subxact who tried to delete it later aborts (analogy
also holds for xmax). Attached patch removes it. While here, I had also
considered worthwhile to add a test involving DDL in aborted subxact as
it is interesting anyway and wasn't covered before.
Attachment | Content-Type | Size |
---|---|---|
0001-Remove-assertion-in-reorderbuffer-that-cmax-is-stabl.patch | text/x-diff | 3.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro HORIGUCHI | 2019-01-31 06:31:53 | Re: Index Skip Scan |
Previous Message | Shawn Debnath | 2019-01-31 05:59:38 | Re: Refactoring the checkpointer's fsync request queue |