Linux命令速查手册索引
Linux命令速查手册索引
记一次TelePG数据库年龄过大导致服务中断事件的处置案例
背景介绍某日中午,接到驻场同事的求助电话,某个TelePG数据库服务出现异常,UPDATE、INSERT等语句执行失败,但SELECT查询正常,系统无法正常使用。检查数据库日志,数据库告警:为避免回卷(wraparound)导致数据库丢失,需要进入单用户模式执行vacuum操作。 根据提示信息,现场同事已经尝试对业务表进行了vacuume操作,但仍有少量表的年龄未下降,数据库未能恢复正常。该数据库目前为预生产用途,未正式承载生产业务,但项目组希望能够尽快恢复使用。二线技术团队迅速介入处置,对可能影响数据库年龄的各项因素进行检查,进入单用户模式,手工执行vacuum freeze命令对相关表进行清理,移除死元组(dead...
Prometheus、Grafana自定义监控Doris数据库
Doris生产环境中需要监控数据库的空间使用情况,暂时没有找到现成的exporter,自己写一个吧。 以下是用shell写的示例,已经能够满足监控告警的需求。 当然,如果能用python写,或许可以实现更多的功能。 编辑自定义指标输出脚本 1234567891011121314151617181920212223242526cat doris_db_size.sh#!/bin/bash#配置MySQL/Doris连接信息MYSQL_USER="doris_monitor""MYSQL_PASS="your_password"MYSQL_HOST="127.0.0.1"MYSQL_PORT="9030"# 结果文件路径(符合 node_exporter textfile 规则)METRICS_FILE="/etc/prometheus/conf/node-exporter/doris_db_size.prom"#执行SQL查询数据库大小RESULT=$(mysql -u $MYSQL_USER -p$MYSQL_PASS -h $MYSQL_HOST -P $MYSQL_PORT -N -e "SELECT table_schema, SUM(data_length + C0ALESCE(index_length, 0)) / 1024 / 1024 / 1024FROM information_schema.tables GRouP BY table_schema;")# 生成 Prometheus 监控格式echo "# HELP doris_database_size_gb Database size in...
Reflections Behind the Box Office Miracle of Nezha 2
Since its release during the 2025 Spring Festival period, Nezha 2 has become a phenomenal cultural event with a record-breaking box office of 6.83 billion yuan (as of March 12). The success of this domestic animated film is not only evident in its commercial figures but also reflects a collective shift in public sentiment amid a global economic downturn. Against the backdrop of modest economic growth and high youth unemployment, the film’s miraculous audience turnout acts like a prism, refracting the complex spectrum of China’s social transformation.
《哪吒2》票房奇迹背后的思考
《哪吒2》自2025年春节档上映以来,以破纪录的68.3亿元票房(截至3月12日)成为现象级文化事件。这部国产动画电影的成功,不仅体现在商业数据层面,更折射出全球经济衰退周期中大众心理的集体转向。在经济增长率不高、青年失业率较高的宏观背景下,该片创造的观影奇迹恰似一面棱镜,折射出中国社会转型期的复杂光谱。
PostgreSQL配置文件中postgresql.conf与postgresql.auto.conf的异同点
在PostgreSQL数据库的日常运维中,配置管理始终是DBA工作的核心环节。随着PostgreSQL 12版本的发布,其配置管理系统在保持传统优势的基础上,进一步强化了动态配置能力。本文将深入剖析postgresql.conf与postgresql.auto.conf两个关键配置文件的技术内涵,通过架构设计、运行机制、实践应用等多维度的对比分析,揭示二者在现代数据库运维体系中的协同关系。 一、配置体系的演进脉络PostgreSQL的配置管理经历了从单一文件到分层管理的演进过程。在早期版本中,所有配置参数都集中在postgresql.conf文件中,这种集中式管理虽然直观,但在动态调整和版本控制方面存在明显局限。自9.4版本引入ALTER SYSTEM命令后,配置体系逐步形成了双轨制管理模式。 在PostgreSQL 12中,这种分层架构达到新的成熟度: 基础配置文件(postgresql.conf):作为声明式配置的载体 自动配置文件(postgresql.auto.conf):记录动态调整的增量配置 内存运行时配置:通过pg_settings视图实时反映 这种三层架构不仅提升了配置的灵活性,更为自动化运维提供了基础设施支持。值得关注的是,postgresql.auto.conf在12版本中强化了原子写入特性,确保在高并发场景下的配置更新可靠性。 二、技术特性的多维度对比2.1 文件生成机制 postgresql.conf:手工创建/编辑,存在于$PGDATA目录 postgresql.auto.conf:由ALTER SYSTEM命令自动生成和维护 案例演示: 12345678-- 执行动态配置修改ALTER SYSTEM SET shared_buffers = '4GB';-- 查看生成的auto.conf\! cat...
hexo 本地搜索异常处理
http://127.0.0.1:40000/search.xml 一些是博文中有异常字符和控制符,找出来删除即可。
Global Hybrid Technology Demystified Four Schools in a Showdown--Who Holds the Ultimate Answer for the Carbon-Neutral Era?
As Tesla’s all-electric wave sweeps the globe, traditional automakers have quietly built a parallel universe with hybrid technology. In this market there is no absolute champion—only distinct schools of thought Toyota THS’s “Balanced Approach,” BYD DM’s “Radical Revolution,” Li Auto’s “Scenario-Based Thinking,” and Mercedes-Benz’s “Incremental Innovation Philosophy” all join in a symphony of internal combustion engines and electric motors. This article will take you through the four major technical camps to unveil the survival rules behind the world’s best-selling hybrid models.
全球混动技术大解密:四大流派对决,谁才是碳中和时代的终极答案?
当特斯拉用纯电浪潮席卷全球时,混合动力技术却在传统车企的深耕下悄然构建起另一个平行宇宙。这个市场没有绝对的王者,只有各具特色的技术流派——丰田THS的"均衡之道"、比亚迪DM系列的"激进革命"、理想汽车的"场景思维"、奔驰的"微创新哲学",共同演绎着内燃机与电动机的协奏曲。本文将带您穿越四大技术阵营,揭开全球畅销混动车型的生存法则。
How to Avoid Being Manipulated by PUA in Your Career or Life
There are all kinds of people in this world! If someone keeps trying to manipulate you by pointing out these traits or labeling you, just flip the script with these responses: Introverted or unsociable? – When someone says you’re reclusive or not a team player, simply say you’re independent and self-reliant. Overly dependent? – If they claim you rely too much on others, say you’re excellent at collaborating. Broke? – If you’re short on cash, say you have enormous potential to build wealth. Materialistic? – When accused of caring only about money, claim that you’re highly driven in your career. Hindsight genius but clueless beforehand? – If they say you’re only smart after the fact, reply that you’re great at learning from your experiences. All talk and no action? – When criticized for...
Respecting children's little habits
When my son eats instant noodles, he insists that they must be soaked, not boiled. And if it’s in a cup, he insists on using the cup itself—no switching to a regular bowl. But that’s not all. After soaking, he insists on sticking a fork into the lid, ensuring it doesn’t lift. My husband finds this troublesome and doesn’t understand it. He insists on using a basin, covering the noodles directly, thinking it’s more efficient. But I gently convinced him to follow my son’s way. In my opinion, this isn’t pampering, and my son isn’t being difficult. I understand that when he’s on the train, he’s seen others preparing noodles this way. Maybe the image is more vivid in his mind, enhanced by the hunger of travel, making it seem especially pleasant. So, that method of making noodles has become...
尊重孩子的小习惯
...