AI Trap of the Week · Tool / agent / security · spotter
The "safer" migration flag
An AI assistant suggested adding SET LOCK_TIMEOUT = 0 before an ALTER TABLE on a 50M-row production users table.
Its explanation: "This makes the lock acquisition safer on large tables, since Postgres won't time out waiting for the lock."
The engineer is about to merge it.
BEGIN;
SET LOCK_TIMEOUT = 0;
ALTER TABLE users ADD COLUMN locale TEXT NOT NULL DEFAULT 'en-US';
COMMIT;Is the AI suggestion wrong?