PostgreSQL failed IANA tz database BUG修复
2023-09-14 09:00:26 时间
PostgreSQL 可以使用IANA发布的时区数据库,但是由于IANA发布的数据库中,有些定义的时区别名并没有对应的时区。
从而导致PG在解析对应别名时会报错。
# select 2016-09-02 08:00:00 NOVST::timestamptz; ERROR: time zone abbreviation "novst" is not used in time zone "Asia/Novosibirsk"
查询pg_timezone_abbrevs函数返回所有的别名与时区对应关系,也会报错。
postgres=# select pg_timezone_abbrevs (); ERROR: time zone abbreviation "novst" is not used in time zone "Asia/Novosibirsk"修复BUG
在PostgreSQL的BUG报告中已经有在讨论这个问题
TOM LANE提供了一个patch,可以避免出现以上问题。
wget https://www.postgresql.org/message-id/attachment/45970/allow-timezone-abbrevs-not-matching-iana-data.patch cd postgresql-9.5.4 patch -p1 ../allow-timezone-abbrevs-not-matching-iana-data.patch make -j 32 make install
重启数据库,测试,如果时区别名不存在时区映射关系时,使用了本地时区。
postgres=# select 2016-09-02 08:00:00 NOVST::timestamptz; timestamptz ------------------------ 2016-09-02 09:00:00+08 (1 row)
长期来看,等PG的内核修复。
参考PostgreSQL自身的物化视图没有MVLOG,也就是说,刷新的时候是VIEW定义产生的记录与MV已刷新的记录进行比对,进行增量更新的过程。
相关文章
- ORA-01022: database operation not supported in this configuration ORACLE 报错 故障修复 远程处理
- ORA-01228: SET DATABASE option required to install seed database ORACLE 报错 故障修复 远程处理
- ORA-38750: FLASHBACK DATABASE may not be performed using a dispatcher. ORACLE 报错 故障修复 远程处理
- ORA-38866: cannot create restore point for an SCN or time before current database incarnation. ORACLE 报错 故障修复 远程处理
- ORA-44317: database open read-only ORACLE 报错 故障修复 远程处理
- ORA-07247: skgfrfms, skgfrnms: read error, unable to read block from database file ORACLE 报错 故障修复 远程处理
- ORA-16448: Primary database corruption has been detected by standby database. ORACLE 报错 故障修复 远程处理
- ORA-16558: database specified for switchover is not a standby database ORACLE 报错 故障修复 远程处理
- ORA-16621: database name for ADD DATABASE must be unique ORACLE 报错 故障修复 远程处理
- MySQL and Mango Combination: A Delicious Database Solution(mysqlmango)
- Oracle PRVF: Assuring Database Performance(oracleprvf)
- cloud database突破传统,选择云数据库:Oracle Cloud Database(naloracle)
- Optimizing Database Performance: An Oracle Design Plan.(oracle设计方案)
- Connecting to MySQL: A StepbyStep Guide for Database Connection(mysql数据库连接)
- How to Fix MYSQL Error 1239 and Keep Your Database Running Smoothly(mysql1239)
- Tracking Oracle Database Activity: A Guide to Querying Operations History(oracle查询操作记录)
- 破解Oracle数据库修复Bug问题(oracle修改bug)
- Redis锁出现Bug,怎么办(redis锁bug)