Re: Deleting a table file does not raise an error when the table is touched afterwards, why?

From: Daniel Westermann <daniel(dot)westermann(at)dbi-services(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Subject: Re: Deleting a table file does not raise an error when the table is touched afterwards, why?
Date: 2016-05-31 06:58:15
Message-ID: 1949642905.5615257.1464677895030.JavaMail.zimbra@dbi-services.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>> Alex Ignatov started a new thread was started on this topic as well...​
>>
>> https://www.postgresql.org/message-id/c571dfc5-91b0-0df2-4e3f-45bc94c11759@postgrespro.ru
>>
>>I posted a link to this thread on his new one as well.
>>
>>David J.​

for completeness: same issue with data checksums enabled:

(postgres(at)[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(at)[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(at)[local]:5555) [postgres] > select count(*) from t1;
count
--------
186450
(1 row)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message CN 2016-05-31 07:45:40 Switching roles as an replacement of connection pooling tools
Previous Message Venkata Balaji N 2016-05-31 06:49:26 Re: After replication failover: could not read block X in file Y read only 0 of 8192 bytes