随笔分类 -  database

1 2 3 下一页

如何使用 lightdb 回收站功能
摘要:背景 在 Oracle 中用户在 drop table 的时候,表文件并不会从磁盘上移除,而是表被重命名为一个特殊的名字,然后用系统表记录。该功能被称为回收站功能。和 Windows 回收站类似,用户可以从回收站中恢复删除的表。 在 Lightdb 24.2 中支持了该功能。 参考: Oracle 阅读全文

posted @ 2024-12-02 11:24 winter-loo 阅读(32) 评论(0) 推荐(0)

why do we need 'select…for share' instead of a simple 'select'
摘要:(From chatgpt) A simple SELECT query in PostgreSQL operates under the MVCC (Multi-Version Concurrency Control) model, which allows it to read data wit 阅读全文

posted @ 2024-10-09 13:53 winter-loo 阅读(41) 评论(0) 推荐(0)

CMU 15445 Project 4
摘要:Garbage Collection The following example comes from the test case TxnExecutorTest_GarbageCollection: Before the first garbage collection, When txn_wat 阅读全文

posted @ 2024-10-06 15:59 winter-loo 阅读(25) 评论(0) 推荐(0)

postgresql hackers emails I posted
摘要:The email lists: may be a buffer overflow problem [ecpg bug]: can not use single '*' in multi-line comment after c preprocessor directives 阅读全文

posted @ 2024-09-26 10:39 winter-loo 阅读(11) 评论(0) 推荐(0)

notes of extendible hash table
摘要:References https://www.geeksforgeeks.org/extendible-hashing-dynamic-approach-to-dbms/ examples walkthrough in detail https://medium.com/@redixhumayun/ 阅读全文

posted @ 2024-08-22 10:39 winter-loo 阅读(8) 评论(0) 推荐(0)

opengauss 初折腾日记
摘要:1 起因是想玩玩 opengauss 的回收站功能。结果根据 opengauss 官方网站,根本试玩不了。 想从源码编译安装 opengauss,结果官方网站文档又不行! 最后还是靠非官方的这篇文章才能安装成功。 2 根据官网描述,需要在 postgresql.conf 里新增 enable_rec 阅读全文

posted @ 2024-08-19 22:19 winter-loo 阅读(29) 评论(0) 推荐(0)

pg_depend
摘要:(classid,objid,objsubid) depends on (refclassid,refobjid,refobjsubid). -- which objects does relation 88088 depends on select * from pg_depend where c 阅读全文

posted @ 2024-08-15 21:22 winter-loo 阅读(5) 评论(0) 推荐(0)

Oracle data dictionaries
摘要:System Table Name Brief Description Related Views SYS.OBJ$ Contains information about all database objects USER_OBJECTS, ALL_OBJECTS, DBA_OBJECTS SYS. 阅读全文

posted @ 2024-08-14 14:21 winter-loo 阅读(13) 评论(0) 推荐(0)

[pg basics] sig_atomic_t
摘要:How does sig_atomic_t actually work? Key Takeways: sig_atomic_t is not an atomic data type used in the context of a signal handler An integral type th 阅读全文

posted @ 2024-08-13 10:45 winter-loo 阅读(22) 评论(0) 推荐(0)

internals of window function implementation
摘要:kinds of frame definition implementation https://ldd.cool/pdf/windowagg.pdf 阅读全文

posted @ 2024-08-10 20:56 winter-loo 阅读(8) 评论(0) 推荐(0)

what is a junk attribute
摘要:From comments of struct JunkFilter: A junk attribute is an attribute in a tuple that is needed only for storing intermediate information in the execut 阅读全文

posted @ 2024-07-26 17:27 winter-loo 阅读(13) 评论(0) 推荐(0)

randomly gathered good presentations of PG
摘要:https://www.postgresql.eu/events/pgconfeu2017/schedule/session/1585-be-pro-activ-on-postgresql-performance/ https://www.postgresql.eu/events/pgconfeu2 阅读全文

posted @ 2024-07-20 03:38 winter-loo 阅读(10) 评论(0) 推荐(0)

what is NamedTupleStore?
摘要:What NamedTuplestore 按字面意思理解,就是一个有名字的 tuplestore, 那估计就不是一个正常的表。根据 PostgreSQL 的官方叫法,NamedTuplestoreScan 对应的表称为 Ephemeral Named Relation, 中文翻译为 短暂的命名关系. 阅读全文

posted @ 2024-07-08 09:51 winter-loo 阅读(52) 评论(0) 推荐(0)

[code notes] storage of a temporary table
摘要:One sentence summary A temporary table could reside within a temporary tablespace, utilizing a temporary name in a temporary schema or namespace. More 阅读全文

posted @ 2024-06-28 16:39 winter-loo 阅读(23) 评论(0) 推荐(0)

[SQL DRIVEN] GetExistingLocalJoinPath
摘要:The following sql statements will trigger calling function GetExistingLocalJoinPath. setup CREATE EXTENSION postgres_fdw; CREATE SERVER foreign_server 阅读全文

posted @ 2024-05-29 20:03 winter-loo 阅读(5) 评论(0) 推荐(0)

[code notes] check_agg_arguments
摘要:The SQL select sum(sum(a)) from myt1 group by a; This note focuses only on sum(sum(a)) and it's about how postgres rejects the sql above. Notes sum(su 阅读全文

posted @ 2024-05-11 20:25 winter-loo 阅读(37) 评论(0) 推荐(0)

[code notes] ecpg precompiler 1
摘要:This note will introduce the workflow of parse.pl of the ecpg precompiler. Run the precompiler: perl parse.pl . ../../../backend/parser/gram.y workflo 阅读全文

posted @ 2024-04-19 11:35 winter-loo 阅读(10) 评论(0) 推荐(0)

lightdb 支持从父查询中返回子查询表中的 rowid
摘要:背景 在如下的 sql 中, select rowid from (select 1 from t); lightdb 24.1 以前会直接报错,说找不到 rowid 列。为了兼容 Oracle, 在 24.1 中,我们选择将告知子查询除了返回子查询应有的列之外,还需返回 rowid 列。 样例 以 阅读全文

posted @ 2024-04-11 16:26 winter-loo 阅读(7) 评论(0) 推荐(0)

[code notes] subquery parsing in postgresql
摘要:The SQL select a from (select a from t); Overview from (select a from t) will map to one RangeTblEntry struct of the outter query. from t will map to 阅读全文

posted @ 2024-04-11 16:09 winter-loo 阅读(8) 评论(0) 推荐(0)

1 2 3 下一页

导航