Comments (6)
Other colleagues may add this code just to want to limit the data writing of the replicated table to only consider this node, and not care about other nodes to enhance the performance of data writing.
from tbase.
Could this be enabled with the config/compile switch?
from tbase.
Regarding the reason for prohibiting the foreign key on the replication table, I consulted the relevant personnel. The main reason is that there can be no triggers on the replication table, and the foreign keys in the PG are also implemented by triggers, so the foreign keys are also prohibited.
If you are sure that you are not using triggers on the replicated table, you can remove this if statement in the source code and recompile the new bin to solve:
from tbase.
So the question emerges why we could not have triggers on the replicated table, granted such triggers would not use anything distributed?
It seems it would be consistent with other limitations coming from distribution, maybe a GUC allowing for this would make sense?
from tbase.
The replication table is that all DN nodes have full data about this table, and all DN nodes will perform operations on this data. Then suppose that there is a trigger on this replicated table: when inserting data, add the inserted data to another non-replicated table, then this non-replicated table will have N pieces of data (N is the number of DN nodes).
Triggers can be used in distributed systems, but replication tables cannot be used, shard tables can be used.
from tbase.
Sure, there's limitation that a trigger cannot touch sharded
tables. The same caveat comes already i.e. with functions that could be executed on DNs only if used in the from
part of the query - if they have DML inside such function would be possibly only executed on a single DN, corrupting the schema.
I think it is fine if the risk is well understood and a GUC allowing for it would be most welcome.
from tbase.
Related Issues (20)
- tabse怎么更新软件版本,并保留数据 HOT 2
- Regression for `insert .. select..` in 2.3.0 HOT 4
- Unable to use immutable function in the partial functional index. HOT 3
- pgxc_ctl init all失败 HOT 1
- benchmark 5.0 压测 tbase 报错 HOT 1
- 至今还在PostgreSQL10的级别。TBase有考虑升级吗? HOT 1
- postgres迁移到TBase时uuid类型的字段如何处理?
- some solutions to share HOT 3
- Oriole storage engine compatibility
- 推出社区官网,丰富文档 HOT 1
- complie error
- TBase开源版本是否不支持存储过程?
- 表无法删除
- postGis插件加载不了 HOT 2
- spatial_ref_sys表有数据但查不出来 HOT 1
- Create Discord/Slack Channel for Project Communication HOT 1
- audit_admin user cannot execute ‘audit all;’ in md5 authenrization. HOT 1
- TBase data compare
- TBase是否有支持存储海量的非结构化文件数据的特性或组件?
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 tbase.