Re: [HACKERS] New feature "... ALTER CONSTRAINT ... VERIFY USING INDEX"

2016-01-08 Thread Alvaro Herrera
Vitaly Burovoy wrote: > I guess you are talking about the other thread[1]. > I'm not sure I have enough experience in Postgres hacking to start > working on it right now, but I'll have a look. > IMO the best way is to raise that topic by a letter with summary what > troubles are left there (in add

Re: [HACKERS] New feature "... ALTER CONSTRAINT ... VERIFY USING INDEX"

2016-01-08 Thread Vitaly Burovoy
On 1/8/16, Alvaro Herrera wrote: > Simon Riggs wrote: >> On 8 January 2016 at 14:14, Vitaly Burovoy >> wrote: >> >> > What about SET NOT NULL constraints? There is no VALIDATE CONSTRAINT >> > for >> > it. >> >> Sounds like a useful addition. > > Yes. In order to make it a reality you need to mak

Re: [HACKERS] New feature "... ALTER CONSTRAINT ... VERIFY USING INDEX"

2016-01-08 Thread Alvaro Herrera
Simon Riggs wrote: > On 8 January 2016 at 14:14, Vitaly Burovoy wrote: > > > What about SET NOT NULL constraints? There is no VALIDATE CONSTRAINT for > > it. > > Sounds like a useful addition. Yes. In order to make it a reality you need to make the NOT NULL constraints appear in pg_constraint.

Re: [HACKERS] New feature "... ALTER CONSTRAINT ... VERIFY USING INDEX"

2016-01-08 Thread Simon Riggs
On 8 January 2016 at 14:14, Vitaly Burovoy wrote: > > What about SET NOT NULL constraints? There is no VALIDATE CONSTRAINT for > it. Sounds like a useful addition. -- Simon Riggshttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Rem

Re: [HACKERS] New feature "... ALTER CONSTRAINT ... VERIFY USING INDEX"

2016-01-08 Thread Vitaly Burovoy
On 1/8/16, Simon Riggs wrote: > On 8 January 2016 at 13:13, Vitaly Burovoy > wrote: > >> On 1/8/16, Simon Riggs wrote: >> > On 8 January 2016 at 12:49, Vitaly Burovoy >> > wrote: >> > >> > >> >> In Postgres9.1 a new feature was implemented [1] for adding PK and >> >> UNIQUE constraints using in

Re: [HACKERS] New feature "... ALTER CONSTRAINT ... VERIFY USING INDEX"

2016-01-08 Thread Simon Riggs
On 8 January 2016 at 13:13, Vitaly Burovoy wrote: > On 1/8/16, Simon Riggs wrote: > > On 8 January 2016 at 12:49, Vitaly Burovoy > > wrote: > > > > > >> In Postgres9.1 a new feature was implemented [1] for adding PK and > >> UNIQUE constraints using indexes created concurrently, but constraints

Re: [HACKERS] New feature "... ALTER CONSTRAINT ... VERIFY USING INDEX"

2016-01-08 Thread Vitaly Burovoy
On 1/8/16, Simon Riggs wrote: > On 8 January 2016 at 12:49, Vitaly Burovoy > wrote: > > >> In Postgres9.1 a new feature was implemented [1] for adding PK and >> UNIQUE constraints using indexes created concurrently, but constraints >> NOT NULL and CHECK still require full seqscan of a table. New

Re: [HACKERS] New feature "... ALTER CONSTRAINT ... VERIFY USING INDEX"

2016-01-08 Thread Simon Riggs
On 8 January 2016 at 12:49, Vitaly Burovoy wrote: > In Postgres9.1 a new feature was implemented [1] for adding PK and > UNIQUE constraints using indexes created concurrently, but constraints > NOT NULL and CHECK still require full seqscan of a table. New CHECK > constraint allows "NOT VALID" op

[HACKERS] New feature "... ALTER CONSTRAINT ... VERIFY USING INDEX"

2016-01-08 Thread Vitaly Burovoy
Hello hackers, I want to implement a new feature that allows to decrease time when table is under ExclusiveLock on ALTERing new constraints NOT NULL or CHECK. In Postgres9.1 a new feature was implemented [1] for adding PK and UNIQUE constraints using indexes created concurrently, but constraints