pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Hills <mark@xwax.org>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Domain check taking place unnecessarily?
Date: Thu, 09 Feb 2023 10:10:01 -0500
Message-ID: <3893890.1675955401@sss.pgh.pa.us> (raw)
In-Reply-To: <2302091035450.14632@stax.localdomain>
References: <2302081605290.5352@stax.localdomain>
	<4b1a0c9e36280b1d4abeb4fb6336832409df6ae0.camel@cybertec.at>
	<2302091035450.14632@stax.localdomain>

Mark Hills <mark@xwax.org> writes:
> On Wed, 8 Feb 2023, Laurenz Albe wrote:
>> It takes 30 seconds to schan the table and determine that all existing 
>> rows satisky the constraint.

> But there's no existing data (note this is adding column, not constraint)

> Existing rows are guaranteed to satisfy the domain check, because the 
> domain check is guaranteed to be immutable (per [1] in my original mail)

immutable != "will accept null".

There could be some more optimizations here, perhaps, but there aren't.

			regards, tom lane





view thread (7+ messages)  latest in thread

Message-ID: <3893890.1675955401@sss.pgh.pa.us>
Permalink:  ../3893890.1675955401@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3893890.1675955401@sss.pgh.pa.us

 · 

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-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mark@xwax.org, laurenz.albe@cybertec.at, pgsql-performance@lists.postgresql.org
  Subject: Re: Domain check taking place unnecessarily?
  In-Reply-To: <3893890.1675955401@sss.pgh.pa.us>

* 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