Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUAfi-000637-Qv for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Dec 2018 13:23:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gUAfg-0002OD-2H for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Dec 2018 13:23:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUAff-0002N0-N7 for pgsql-hackers@lists.postgresql.org; Tue, 04 Dec 2018 13:23:27 +0000 Received: from mail-qk1-x744.google.com ([2607:f8b0:4864:20::744]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUAfb-0007Cz-JT for pgsql-hackers@postgresql.org; Tue, 04 Dec 2018 13:23:25 +0000 Received: by mail-qk1-x744.google.com with SMTP id 131so9550029qkd.4 for ; Tue, 04 Dec 2018 05:23:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=VuPVhPnR6JcYVd13iYHLmwzIv4HcJQrj+HK6IxAsTFM=; b=afLbmH3itFiMv+N49fkzpAapjGHbycOXH4KvuUzTqd/hcRnPfH++No7HG2AEWPtCZo mtzHpifq+8zN95mW/qnrmfYdVXlXeyl2lQOW5NIHhs1tI2kplK/FWjv2sT04UZ4O3Zf6 lN9dbz2cMCObWGrBeuxwsLMSpNNkvZrg3fwbMi07geka3sORUvQiStR+Zo7FRzNLHu9O +NH2/oASYkErnwtrru7U1eD3sB0Ahiu25MQX2gwgpqSK4GlWbNFXn+D1GlPHM0000BYS HIPFnTllvvFPvGSNuj58UCN2APdU9Nd/Z/PE9Nu5/qcvv44gP/PHWdsPRRNejV6FXL/D VcSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=VuPVhPnR6JcYVd13iYHLmwzIv4HcJQrj+HK6IxAsTFM=; b=Ifk5lop1HK4QlHjV8jXDHNK6DtUwi75+8XqTYs/wWtMDahUpZuXiSXvtwoeW8R6rLF cF+FynUhSGDC3qpZNr/TNc0SozbIb3/F8GVIvefLkX8jjLmeIE5+s91vsONbFIyaqzPI qnTnEXeuJYyHCZUQ2fePens6/+isIdOrCO+pBNON+MBS49Yr7DRdAQXP5H1k5NAZVMdr D+6BzHDGQBJdzthMDvw7+BYIuP60t73B+iyAbiScHBUqRfMMhXHKdl5hQhX1qyDps6/e tthcLzWYoueNdfH9h/TkBaqommbtmyIWYn1IQTK/hWyavYA0F3zoOc5aNvQe3OoO++wX HRvg== X-Gm-Message-State: AA+aEWbSrV4bLiE5niJSJZVQslVEAzXye15qaEALJulL9p3MfKWSftJ1 qkkygumbtwBPwR33pQZvRuBEbg== X-Google-Smtp-Source: AFSGD/UQNuFlFAvw6N8A7ALccnFUpx479MZvtAZTa0WDAAIxXTfXDbaACYS7bn7hdNzFvXaM6Zusww== X-Received: by 2002:a37:6389:: with SMTP id x131mr17805234qkb.149.1543929802477; Tue, 04 Dec 2018 05:23:22 -0800 (PST) Received: from alvin.alvh.no-ip.org ([201.186.80.75]) by smtp.gmail.com with ESMTPSA id w52sm11261549qtc.51.2018.12.04.05.23.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Dec 2018 05:23:21 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 0B347580; Tue, 4 Dec 2018 10:23:20 -0300 (-03) Date: Tue, 4 Dec 2018 10:23:20 -0300 From: Alvaro Herrera To: Peter Eisentraut Cc: pgsql-hackers Subject: Re: additional foreign key test coverage Message-ID: <20181204132320.kzismcb7bajz4lvc@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7ae17c95-0c99-d420-032a-c271f510112b@2ndquadrant.com> User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Dec-04, Peter Eisentraut wrote: > During the development of my recent patch "unused/redundant foreign key > code" [0], I had developed a few additional test cases to increase the > coverage in ri_triggers.c. They are in the attached patches with > explanations. With these, coverage should be pretty complete, except > hard-to-trigger error cases. Interested reviewers can also follow along > on coverage.postgresql.org. Hmm. One of the things I did for FKs on partitioned tables was remove all the cases involving only unpartitioned tables, then run just the foreign_key test and see what the coverage looked like -- in the first versions, there were large swaths of uncovered code. That guided me to add a few more tests to increase coverage in later versions. This is all to say that I think it would be useful to include the case of partitioned tables in the tests you add, where relevant. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services