TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Postgres Unlogged Tables

85 点作者 plaur782超过 2 年前

6 条评论

tremon超过 2 年前
<i>should someone literally pull the plug on your Postgres database server, your data is 100% safe, except for unlogged tables, in which your data is 100% gone - by design!</i><p>This omits a crucial fact: your data is not gone until Postgresql has gone through its startup recovery phase. If you really need to recover unlogged table data (to which every proper database administrator will rightly say &quot;then WhyTH did you make it unlogged&quot;), you should capture the table files <i>before</i> starting the database server again. And then pay through the nose for a data recovery specialist.<p><i>However, a crash will truncate it.</i><p>So this isn&#x27;t exactly true. A crash <i>recovery</i> will truncate it.
评论 #34850034 未加载
评论 #34849009 未加载
评论 #34849346 未加载
评论 #34853436 未加载
BeefySwain超过 2 年前
Very well written and detailed article, with the caveat that they never mention a use case they consider legitimate. Does anyone here have any uses? I could imagine some sort of ETL type tasks which are transient could make sense. Thoughts?
评论 #34851806 未加载
评论 #34850242 未加载
评论 #34850083 未加载
评论 #34850001 未加载
评论 #34852923 未加载
评论 #34853474 未加载
jonstewart超过 2 年前
Does COPY FROM sidestep the WAL? My (perhaps incorrect) understanding is that pg writes such data to a table file then uses a small transaction to make it live.
评论 #34849316 未加载
chuckledog超过 2 年前
Seems like bulk loading might be a good use case here.
评论 #34854126 未加载
评论 #34850583 未加载
评论 #34858188 未加载
评论 #34850041 未加载
lazyant超过 2 年前
can we have &quot;best of both worlds&quot; for inserting a lot of data quickly, to have an unlogged table for performance and a trigger to copy data to another regular table for permanence?
评论 #34852885 未加载
sebazzz超过 2 年前
So similar use cases as MSSQL in-memory tables?