aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2014-11-14 18:20:59 +0100
committerAndres Freund <andres@anarazel.de>2014-11-15 01:22:32 +0100
commitfde9994bc99e701c2479a25bae6d2aaf622ec2fd (patch)
tree1dfa2cb7380d125b42844964e12f750b34ce2568 /src/tutorial
parentb0a48e996bd7ff336ea26344d3d97ad32b22a61a (diff)
downloadpostgresql-fde9994bc99e701c2479a25bae6d2aaf622ec2fd.tar.gz
postgresql-fde9994bc99e701c2479a25bae6d2aaf622ec2fd.zip
Ensure unlogged tables are reset even if crash recovery errors out.
Unlogged relations are reset at the end of crash recovery as they're only synced to disk during a proper shutdown. Unfortunately that and later steps can fail, e.g. due to running out of space. This reset was, up to now performed after marking the database as having finished crash recovery successfully. As out of space errors trigger a crash restart that could lead to the situation that not all unlogged relations are reset. Once that happend usage of unlogged relations could yield errors like "could not open file "...": No such file or directory". Luckily clusters that show the problem can be fixed by performing a immediate shutdown, and starting the database again. To fix, just call ResetUnloggedRelations(UNLOGGED_RELATION_INIT) earlier, before marking the database as having successfully recovered. Discussion: 20140912112246.GA4984@alap3.anarazel.de Backpatch to 9.1 where unlogged tables were introduced. Abhijit Menon-Sen and Andres Freund
Diffstat (limited to 'src/tutorial')
0 files changed, 0 insertions, 0 deletions