From: | Ravi Krishna <srkrishna1(at)aol(dot)com> |
---|---|
To: | david(dot)g(dot)johnston(at)gmail(dot)com, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Truncation of UNLOGGED tables upon restart. |
Date: | 2018-11-01 21:20:19 |
Message-ID: | 1177060548.6477958.1541107219801@mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> There is no such thing as a "read only" table in PostgreSQL. All tables are read/write no matter that frequency of either event. There is nothing > inherently special about "no writes for 4 days" and "no writes for 10 seconds" that would allow for a distinction to be made. There could be write > in progress on the table just as it crashes Friday.
I am aware that unlogged tables have no entries in WAL, but I assumed (incorrectly) that PG will at least keep track whether any writes was done on a table since last checkpoint, and if none, it will find no reason to truncate it.
The use case I was thinking about is that if we have to load a large set of data every weekend and use it for reporting until next weekend, why not create those tables as unlogged.
From | Date | Subject | |
---|---|---|---|
Next Message | Tim Cross | 2018-11-01 21:28:56 | Re: Add columns to table; insert values based on row |
Previous Message | David G. Johnston | 2018-11-01 20:58:12 | Re: Truncation of UNLOGGED tables upon restart. |