Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pVukG-0007AE-Il for pgsql-bugs@arkaria.postgresql.org; Sat, 25 Feb 2023 13:37:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pVukE-0001SZ-3p for pgsql-bugs@arkaria.postgresql.org; Sat, 25 Feb 2023 13:37:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pVukD-0001SH-R0 for pgsql-bugs@lists.postgresql.org; Sat, 25 Feb 2023 13:37:45 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pVukA-00075R-KB for pgsql-bugs@lists.postgresql.org; Sat, 25 Feb 2023 13:37:44 +0000 Received: by mail-wr1-x435.google.com with SMTP id h14so1897200wru.4 for ; Sat, 25 Feb 2023 05:37:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=fnvzmSGZjXp+tuLYhYsCvEYmlPeKrxeqshI7rS9v/cI=; b=jNPFc4DRHeuhMCWWuzbUdjO9YzAe1rjz3rNV28UZdG/BpnfvK/It8PIaxu8JbXnHQx 9AaenBmVcbNzbuV0R3+e8bCK7ievfQ/8fcdBnNABlKwAthKBNadPSPSSsVIvTyXWg8ij ne0w8NUwoY7ZcsHFr71NHIvWfk2T56XkeF+aEeVg+PXcFdQ6WWry5L1zqtwD7OtHg4Tr BpNsmXJ/0XDSgAxnQfRrcHH4EA3WNg+qKpZjPttekIXKXaOaIItXuSKcwelUCcACNLM/ wabGd9HAE+HBfPdFvDVfba7Hbxfr8/mEpPU9nsmf8l6F4IxccqlXQXqAjyeW42MMxs5F b2/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fnvzmSGZjXp+tuLYhYsCvEYmlPeKrxeqshI7rS9v/cI=; b=aJA/SNLBDL3UgarbvZlw3WmGb5TsUmhxSqiKCWZpDyKXaf/20Dp/Vgq/vchpReTgET 2d/uy66OdDIGOQ68MFUvvnPzYMlDYQpEhc9nYtecjnCVpQrr8SmSp7KFLANVnl+FOlki v1FDX/s8kJIdMskgKRp4XQyemDrdBUUQnrYil3Rw4Zs+4GVGL41KfFYr6r72VeQoDODE WBZcQlobOn+4PLvhCRd+X7VxCBMVYVuULfq4rPei9HwFRTP8uwBaSMPL3eJwqvf1yUx4 N/WiUYD4aRqL1CXQs+UBX9oE+lhmt5JssWbjIStD/qtUFOOBsHSKhi31/ECDFBrFJ6VK dxNg== X-Gm-Message-State: AO0yUKUQjot+sc8KXWrr2QXjnuoMLyRBbXdTArtaU799DZt7exikJsL1 gPJTyRm9EzRSbj1UOSUGycZ/rLz3P7Ui6UtVTUjvOw4rJoQX7YA6oHNGdxvh1qQl7lWpWHxprM+ lCsIHtfRC69LEiY8gSjVgPKE/GkdAsV3eIAfwBugmN7DJwFwFi5a9zCbrdVw1BqFTOHlm2J9X65 UXANBqiVriF4taGfrxyAyfOHm++HJXdIpGudtWIIA8KUa+lyGxB2xDWU8= X-Google-Smtp-Source: AK7set9khyg75Ot+mgLTcled4d3gUl3ptdjXYo+oG4CtJF+CvlANy4aQdjV9HLXlpZ6rvKUM7ZZKbw== X-Received: by 2002:a5d:45c1:0:b0:2c7:a55:bef2 with SMTP id b1-20020a5d45c1000000b002c70a55bef2mr11292427wrs.46.1677332261054; Sat, 25 Feb 2023 05:37:41 -0800 (PST) Received: from [10.137.0.17] (ip-86-49-228-162.bb.vodafone.cz. [86.49.228.162]) by smtp.gmail.com with ESMTPSA id a2-20020adfdd02000000b002c3f03d8851sm1841746wrm.16.2023.02.25.05.37.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Feb 2023 05:37:40 -0800 (PST) Message-ID: <5dfefe9d-c03b-d831-2a16-8baa61d18b46@enterprisedb.com> Date: Sat, 25 Feb 2023 14:37:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: two bugs Content-Language: en-US To: zhxpgh , pgsql-bugs References: From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I don't think any of this a bug, it's the expected behavior. It would be better if you also shared some reasoning why you think these are bugs. 1) DISABLE TRIGGER ALL disables all triggers, including those for referential integrity. So it's not surprising some of the data violates the FK on restore. 2) Similarly for the materialized view - you create a unique index on the MV at a point when there's no duplicates. But then you insert data into the source tables. If you tried to refresh the MV at this point, it'd fail - which is expected. And restore first loads all the data and then builds the materialized view. We don't have the capability to dump/restore the MV data directly, we have to run the query. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company