pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sergei Kornilov <sk@zsrv.org>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: using index or check in ALTER TABLE SET NOT NULL
Date: Fri, 06 Apr 2018 10:28:00 +0300
Message-ID: <3796271522999680@web16g.yandex.ru> (raw)
In-Reply-To: <b74455c1-f89e-02e3-471a-8fdd9275fab9@2ndquadrant.com>
References: <81911511895540@web58j.yandex.ru>
	<CA+TgmoZKR4dTR7KyoM4jfJN2J-eNoBRG2_XHdZa1f0VUbK1xXQ@mail.gmail.com>
	<20171129152135.GN4628@tamriel.snowman.net>
	<9878.1511970441@sss.pgh.pa.us>
	<370481511970756@web3j.yandex.ru>
	<b74455c1-f89e-02e3-471a-8fdd9275fab9@2ndquadrant.com>

Hello, Peter!
I agree my patch seems as strange workaround. And better will be SET NOT NULL NOT VALID feature. But this change is very complicated for me
For now my patch is small, simple and provides way for users.

regards, Sergei

06.04.2018, 06:29, "Peter Eisentraut" <peter.eisentraut@2ndquadrant.com>:
> On 11/29/17 10:52, Sergei Kornilov wrote:
>>  My target problem of adding NOT NULL to big relation without long downtime can be done with ADD CONSTRAINT NOT VALID, VALIDATE it in second transaction, then SET NOT NULL by my patch and drop unneeded constraint.
>
> It seems to me that this is a workaround for not properly cataloguing
> NOT NULL constraints. If we fixed that, you could do SET NOT NULL NOT
> VALID and go from there. Maybe we should look again into fixing that.
> That would solve so many problems.
>
> --
> Peter Eisentraut http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (73+ messages)  latest in thread

Message-ID: <3796271522999680@web16g.yandex.ru>
Permalink:  ../3796271522999680@web16g.yandex.ru/
Also on:    postgresql.org/message-id/3796271522999680@web16g.yandex.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: sk@zsrv.org, peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us, sfrost@snowman.net, robertmhaas@gmail.com
  Subject: Re: using index or check in ALTER TABLE SET NOT NULL
  In-Reply-To: <3796271522999680@web16g.yandex.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox