I'm in an unfortunate position of needing to add a unique, not null index to a 
very large table with heavy churn. Without having much impact, I can add a NULL 
column that reads default values from a sequence for new rows, and then do 
batch updates over time to fill in the old values.... but then I hit a big wall 
of locking when updating that column to be NOT NULL. 

If I were to make a partial index on my new, sequence-feed column where value 
is null (concurrently, of course), is postgres smart enough to use that index 
when checking existing values for the ALTER command? Or even any index (I'll 
have to make a unique one eventually anyway).

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to