Re: Truncation of UNLOGGED tables upon restart.

2018-11-01 Thread Stephen Frost
Greetings, * Michael Paquier (mich...@paquier.xyz) wrote: > On Thu, Nov 01, 2018 at 07:06:32PM -0400, Stephen Frost wrote: > > No, we don't currently track that information but it's an interesting > > idea, at least imv. > > What would be the use case for it? What you are looking for here is > g

Re: Truncation of UNLOGGED tables upon restart.

2018-11-01 Thread Michael Paquier
On Thu, Nov 01, 2018 at 07:06:32PM -0400, Stephen Frost wrote: > No, we don't currently track that information but it's an interesting > idea, at least imv. What would be the use case for it? What you are looking for here is gathering information about all pages in a relation and just aggregate w

Re: Truncation of UNLOGGED tables upon restart.

2018-11-01 Thread Stephen Frost
Greetings, * Ravi Krishna (srkrish...@aol.com) wrote: > > 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 > > secon

Re: Truncation of UNLOGGED tables upon restart.

2018-11-01 Thread Ron
On 11/01/2018 03:58 PM, David G. Johnston wrote: On Thu, Nov 1, 2018 at 1:49 PM Ravi Krishna > wrote: Per documentation unlogged tables are not crash safe and PG will truncate it when it restarts after a crash. Does this apply to even read only unlogged tab

Re: Truncation of UNLOGGED tables upon restart.

2018-11-01 Thread Ravi Krishna
> 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 cou

Re: Truncation of UNLOGGED tables upon restart.

2018-11-01 Thread David G. Johnston
On Thu, Nov 1, 2018 at 1:49 PM Ravi Krishna wrote: > Per documentation unlogged tables are not crash safe and PG will truncate > it when it restarts after a crash. Does this apply to even read only > unlogged tables. > > For example: > > On Monday I load data into unlogged tables. > > Then from T