-
12. Generator Page — Type 0x09 ..... 46
12.1. Creating Lots Of Sequences ..... 52
13. Write Ahead Log Page — Type 0x0a ..... 58
Appendix A: Fbdump ..... 60
Appendix B: Document history ..... pages in the database are in use and which are free.
Up until Firebird 3.0, the next page is a Write Ahead Log page (page type 0x0a) but this page is wasted space, if present, and will most likely be dropped activate a shadow, or have the Firebird engine activate one automatically.
Unfortunately, if a database write stores corrupt data in the database, the shadow file(s) will be identically corrupted.
Because shadow
0 码力 |
63 页 |
261.00 KB
| 2 年前 3
-
Outline
• 事务实现原理和Write Ahead Logging(WAL)
• 分布式事务和两阶段提交的原理
Greenplum两阶段提交协议的实现
Greenplum两阶段提交协议的优化
## 事务的属性:ACID
|属性|含义|数据库系统的实现|
|---|---|---|
|Atomic原子性|事务中的操作要么全部正确执行,要么完全不执行。|Write Ahead Logging,分布式事务:两阶段提交协议| Concurrency Control、两阶段加锁(Two Phase Locking,2PL)、乐观并发控制(OCC)|
|Durability持久性|一个事务在提交之后,该事务对数据库的改变是持久的。|Write Ahead Logging + 存储管理|
## Disk-Oriented DBMS Components

## ■ Steal → Undo Log
允许Buffer Pool未提交事务所修改的脏页刷回到持久存储,为了保证原子性,先把Undo Log写入日志文件。Undo Log记录修改数据对象的旧值(Before
0 码力 |
42 页 |
2.12 MB
| 2 年前 3
-
Использование индексов, если есть.
• Параметры репликации данных.
1 Семейство MergeTree
2 Семейство Log
3 Движки для интеграции
4 Специализированные движки
## Возможности для интеграции с PostgreSQL
number FROM numbers(10)
## Репликация данных из PostgreSQL в ClickHouse
Движок таблиц для
Read/Write
репликации
Движок баз данных для
репликации
, AKA "THE NORM": IT'S LIKE THE APPLICATION (/LIBRARY) IS THE COMPILER...
## WHAT IS JITTING?
- INSTEAD OF AHEAD-OF-TIME (AOT), AKA "THE COMPILER...
- JUST-IN-TIME (JIT) IS COMPILATION AT THE POINT OF NEED
## WHAT IS JITTING?
- INSTEAD OF AHEAD-OF-TIME (AOT), AKA "THE NORM": IT'S LIKE THE APPLICATION (/LIBRARY) IS THE COMPILER.. SECURITY BREACH
SQL Injection
Name: or 1=1--
Password:
Log In
## CPP INJECTION / SECURITY BREACH
SQL Injection
Name: or 1=1--
Password:
Log In
SELECT * FROM Users WHERE Name=' or 1==1--'
0 码力 |
222 页 |
5.45 MB
| 1 年前 3
-
not Go, Dave Cheney
RocksDB
Great write throughput.
Okay read throughput.
Cons:
Required Cgo.
BoltDB
Pure Go.
Great read throughput.
Cons:
Bad write throughput.
Why build it?
Go native native key-value DB for Dgraph.
No compromise in read-write performance.
Avoid Cgo.
What did we spend?
Spent a few months.
Built with <1 full-time gopher.
Aka, the power of Go!
’ alt=‘OCR图片’/> creating fewer, larger and larger files
More levels
High write throughput
High read latency
Example: RocksDB
Fewer levels
Low write throughput
Low read latency
Example: BoltDB
Badger
0 码力 |
74 页 |
1.70 MB
| 3 月前 3
-
$wazero run main.wasm
hello
’ alt=‘OCR图片’/>
第三部分
Changes to the standard library
’ alt=‘OCR图片’/>
增加
log/slog
slog:支持日志级别的高性能结构化日志包
slog.Info("hello", “gopherchina”, 2023)
slog.SetDefault(slog.New(slog.NewTextHandler(os {“time”:“2023-06-09T23:00:00Z”,“level”:“INFO”,“msg”:“hello”,“gopherchina”:2023}
’ alt=‘OCR图片’/>
增加
log/slog
slog benchmark
benchstat zapbenchmarks/zap.bench slog.bench 0 码力 |
26 页 |
1.90 MB
| 3 月前 3 -
531
18.10. Secure TCP/IP Connections with SSH Tunnels ..... 534
18.11. Registering Event Log on Windows ..... 535
19. Server Configuration ..... 536
19.1. Setting Parameters ..... 536 Connections and Authentication ..... 541
19.4. Resource Consumption ..... 546
19.5. Write Ahead Log ..... 553
19.6. Replication ..... 559
19.7. Query Planning ..... 564
19.8. Error Tasks ..... 649
24.1. Routine Vacuuming ..... 649
24.2. Routine Reindexing ..... 657
24.3. Log File Maintenance ..... 658
25. Backup and Restore ..... 660
25.1. SQL Dump ..... 660 0 码力 |
2727 页 |
11.93 MB
| 2 年前 3
|