Re: Deleting a table file does not raise an error when the table is touched afterwards, why? - Mailing list pgsql-general

From Daniel Westermann
Subject Re: Deleting a table file does not raise an error when the table is touched afterwards, why?
Date
Msg-id 1949642905.5615257.1464677895030.JavaMail.zimbra@dbi-services.com
Whole thread Raw
In response to Re: Deleting a table file does not raise an error when the table is touched afterwards, why?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Deleting a table file does not raise an error when the table is touched afterwards, why?
List pgsql-general
>> Alex Ignatov started a new thread was started on this topic as well...​
>>
>>
>>I posted a link to this thread on his new one as well.
>>
>>David J.​


for completeness: same issue with data checksums enabled:

(postgres@[local]:5555) [postgres] > show data_checksums ;
 data_checksums
----------------
 on
(1 row)

Steps to reproduce:
create table t1 ( a int );
insert into t1 values ( generate_series(1,1000000));
select count(*) from t1;

=> rm the table files

=> select count(*) still works

(postgres@[local]:5555) [postgres] > select count(*) from t1;
  count  
---------
 1000000
(1 row)

=> then shutdown fast:

LOG:  received fast shutdown request
LOG:  aborting any active transactions
FATAL:  terminating connection due to administrator command
LOG:  autovacuum launcher shutting down
LOG:  shutting down
FATAL:  could not open file "base/13056/16384": No such file or directory
CONTEXT:  writing block 2946 of relation base/13056/16384
LOG:  checkpointer process (PID 3004) exited with exit code 1
LOG:  terminating any other active server processes
LOG:  abnormal database system shutdown

=> startup

LOG:  database system shutdown was interrupted; last known up at 2016-05-31 10:52:17 CEST
LOG:  database system was not properly shut down; automatic recovery in progress
LOG:  redo starts at 0/7070808
LOG:  record with zero length at 0/76EECD0
LOG:  redo done at 0/76EEC68
LOG:  last completed transaction was at log time 2016-05-31 10:51:27.689776+02
LOG:  MultiXact member wraparound protections are now enabled
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started

(postgres@[local]:5555) [postgres] > select count(*) from t1;
 count  
--------
 186450
(1 row)





pgsql-general by date:

Previous
From: Venkata Balaji N
Date:
Subject: Re: After replication failover: could not read block X in file Y read only 0 of 8192 bytes
Next
From: CN
Date:
Subject: Switching roles as an replacement of connection pooling tools