Not every article comes out of a consulting session or a lab experiment. Some arrive third-hand, from people whose daily work keeps them on the front line. A friend of the author's, a working DBA, agreed to let his unreleased memoirs be quoted here on condition of anonymity — hence the title. The anecdotes below are his.
On deadlocks
His stated view of the job: being a DBA is pleasant enough, with the users of the databases as the one recurring problem.
An accounting employee calls, already aggrieved. "We get deadlocks all the time." The reply: "Well, don't do it then." No good deed goes unpunished — the caller is not the type to take advice. "It's your Postgres system that gives me these deadlock errors. So you fix them."
"As you wish." A short burst of activity later: "Ok, you shouldn't get any more deadlock errors now." A mumble, then a hang-up that doesn't sound much like thanks. This is described as perfectly acceptable, because the fix was setting his lock_timeout to 500.
On bloat and disk space
The next day, the same caller, in the same accusing tone: the disk is 95% full. The DBA points out that the monitoring system already alerted him and that an e-mail went out to their team ten days earlier. "Can't you fix that?" — "Do you want me to extend the file system?"
The objection: the data volume hasn't grown, so why is a bigger disk needed? After logging in and looking, the answer is a 350GB table eating the space, 99% of it dead. A further oddity surfaces: a prepared transaction that the caller created a month ago and never committed. Once it is cleared and free space is regained, the caller is told to just run a VACUUM (FULL) on the table and he'll be fine.
The follow-up call
An hour later, the same voice reports that VACUUM (FULL) says "out of disk space". The offer to extend the file system is repeated. Being nice was clearly a mistake; the caller goes on the offensive: "Do your job and clean up the database."
"As you wish." Another burst of activity: "Ok, now you have got enough free disk space." The call ends there. As the memoirist puts it, few things are as satisfying as a quick TRUNCATE when things get out of hand.



