3 ms·
> We also use Postgres which doesn't create the obstacles that some other database systems have, for example with locking tables on schema changes. Actually sc
by dlubarov 12y ago
> We also use Postgres which doesn't create the obstacles that some other database systems have, for example with locking tables on schema changes.
Actually schema changes still require exclusive table locks, they're just held very briefly since Postgres doesn't need to rewrite each tuple. (With some exceptions, like adding a NOT NULL column, or reducing the size of a VARCHAR.)
I don't mean to be pedantic, it can be important because the exclusive lock can be blocked by other long-running queries. Then Postgres will try to grant the alter table's exclusive lock before other conflicting locks, so normal reads and writes will be locked out until the long query completes or one of the queries is killed.
- jeffdavis 12y ago"Downtime" is a under-defined in this context. The author seems to use the definition "won't cause errors or disconnections" while you are also considering the response time. Everyone cares about the former, while the latter is of more interest to heavily-loaded sites. The case you mention of a long-running query is important, so everyone needs to have some idea of their workload at the time.
- bjeanes 12y agoHaha I saw this happen today, actually. Painful.