Tag: Block

Recovering PostgreSQL Data When Blocks Are Corrupted

As part of our work on “PostgreSQL for Dolphins and Sea Lions,” I also enjoy reading the PostgreSQL mailing lists to see what kinds of problems come up and how they’re solved.

One email in particular caught my attention:

I’m unable to access one of the tables. Even a simple SELECT statement fails with the error below.

prod=# SELECT count(*) FROM schema.tablename;

WARNING:  page verification failed, calculated checksum 26618 but expected 52580
ERROR:    invalid page in block 43197 of relation …


innodb_deadlock_detect - Rather Hands off!

Recently we had a new customer who has had from time to time massive database problems which he did not understand. When we reviewed the MySQL configuration file (my.cnf) we found, that this customer had disabled the InnoDB Deadlock detection (innodb_deadlock_detect).

Because we have advised against doing this so far, but I never stumbled upon this problem in practice, I have investigated a bit more about the MySQL variable innodb_deadlock_detect.

The MySQL documentation tells us the following
[1
]: …



How many warm MyISAM key blocks do you have?

When you are working with MyISAM [ 1 ] tables MySQL provides a feature called the Midpoint Insertion Strategy [ 2 ]. You can enable it with the parameter key_cache_division_limit [ 3 ].

By default, the key cache management system uses a simple LRU [ 4 ] strategy for choosing key cache blocks to be purged:

MyISAM key buffer

When using the Midpoint Insertion Strategy feature, the LRU chain is divided into two parts:

  • the hot sub list

and

  • the warm sub list.

The division point between those two parts is not fixed, but the …




Subscribe to RSS - Block