Comments (3)
Thanks for report @danielwestermann team has stared to look into the reported issue, as of now its not expected to see this error. Will provide update.
from gpdb.
The stack trace is:
heap_update_internal heapam.c:3226
simple_heap_update heapam.c:4107
CatalogTupleUpdate indexing.c:286
AppendOnlyVisimapStore_Store appendonly_visimap_store.c:156
AppendOnlyVisimap_Store appendonly_visimap.c:234
AppendOnlyVisimap_IsVisible appendonly_visimap.c:205
AppendOnlyVisimap_UniqueCheck appendonly_visimap.h:198
appendonly_index_unique_check appendonlyam_handler.c:685
table_index_unique_check tableam.h:1209
table_index_fetch_tuple_check tableam.c:213
_bt_check_unique nbtinsert.c:461
_bt_doinsert nbtinsert.c:256
btinsert nbtree.c:285
index_insert indexam.c:191
ExecInsertIndexTuples execIndexing.c:403
ExecUpdate nodeModifyTable.c:1718
ExecModifyTable nodeModifyTable.c:2689
...
from gpdb.
More minimal repro:
CREATE TABLE uao_unique_index_update_1 (a INT unique, b INT) USING ao_row DISTRIBUTED REPLICATED;
INSERT INTO uao_unique_index_update_1 SELECT a, 1 FROM generate_series (1, 32768) a;
UPDATE uao_unique_index_update_1 SET b = 2;
-- If we were to select the contents of the visimap relation on any of the
-- segments we would see 2 entries at this point, one with first_row_no = 0 and
-- the other with first_row_no = 32768.
UPDATE uao_unique_index_update_1 SET b = 3;
ERROR: attempted to update invisible tuple (seg0 127.0.1.1:7002 pid=1100784)
Some notes of discussion w/ @ashwinstar yesterday:
(1) The main issue is that we are trying to AppendOnlyVisimapStore_Store
a visimap row in the catalog (as part of ExecUpdate() -> ... -> uniq check
, that was inserted earlier as a part of the appendonly_delete() operation within appendonly_tuple_update
. Said row hasn't yet been persisted into the catalog (that stuff is done in appendonly_dml_finish -> appendonly_delete_finish -> AppendOnlyVisimapDelete_Finish
, so there is no chance for AppendOnlyVisimapStore_Store to find it.
Probably, we need a version of AppendOnlyVisimapDelete_Hide
without the AppendOnlyVisimapEntry_HideTuple
at the end.
(2) What we should be doing instead is to be using the backing visimap htab and spill file used to manage visibility info, to answer the visibility check that is a part of the uniqueness check. Calling AppendOnlyVisimap_IsVisible
has the unfortunate side effect of "storing" a dirty visimap entry.
(3) Using the VisimapDelete
infrastructure as mentioned in (2) is going to be a tad tricky, since that is not exposed very well at this layer.
from gpdb.
Related Issues (20)
- How to read the storage files of an AO table and recover the data as much as possible. HOT 4
- Memory pool is necessary! HOT 3
- The global deadlock detected process of the greenplum master node has abnormal RSS memory usage. HOT 29
- Incorrect version in configure.in file. HOT 2
- could not access status of transaction 70523908 (slru.c:896) HOT 1
- How Greenplum views the amount of data exchanged between cross data nodes in motion in a distributed execution plan๏ผ HOT 2
- ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list HOT 1
- GPDB7 REGRESSION: External partitions isn't working as documented or as gpdb6 worked HOT 5
- REINDEX the primary key result in a key conflict issue HOT 2
- query crash when contain multiple shareinput in qd slice HOT 1
- error in unit tests when built with coverage enabled.
- Issue with CXformPushJoinBelowUnionAll Impacting Compilation Time HOT 3
- MQDA plan by Postgres-based planner is not correct when all group-by keys are constants HOT 2
- can't use index HOT 2
- assert failure when insert AO with gin index. HOT 1
- Planner delete with "dedup" semi-join on replicate table may cause ERROR HOT 7
- Segmentation fault on jsonb_array_elements with ordinality HOT 2
- Consistency check on SPI tuple count failed when CTE RETURNING is used with INTO DISTRIBUTED REPLICATED table HOT 3
- Non-union op will raise error for replicated locus and partitioned locus.
- gp_acquire_sample_rows failed unless acquire lock in advance HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpdb.