Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ff9t1-0008O3-FP for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Jul 2018 20:14:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ff9sz-0000fz-3I for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Jul 2018 20:14:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ff9sy-0000fs-SG for pgsql-hackers@lists.postgresql.org; Mon, 16 Jul 2018 20:14:20 +0000 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ff9sr-0001QU-2w for pgsql-hackers@postgresql.org; Mon, 16 Jul 2018 20:14:20 +0000 Received: by mail-qt0-x243.google.com with SMTP id m13-v6so34043610qth.1 for ; Mon, 16 Jul 2018 13:14:12 -0700 (PDT) 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=2dDB+9T+cFfBaogbFsvXGfbACRsnnW3MZgaVA/BMt2c=; b=nwalosICA+hTSoh5JEksl8s5HFOk0p+PA4TR+pwGWTEVOe7nMlkLWg4susSzLzhbB3 1LlOZDomVbg5aKAbM1G1CWWSVAEYcMS/9kwXjjec8yXiKYK0bno6v4fVmQaWHNaVDq7p 0pRp0XYGWRHxluaoCypTEkpVZ+SJNr4k9WsaPl1Jud/+tmGUMJ0JtqNoA9oeDu3QzCnE 0zsP/nsi6mkpZHqsdQFzKbWh3JQIpcFiVfpVk1ApOrx7QqAv7Z0K5vcL6jpIGcBNihZD 0VgBRG7q2bOcTVkX3razHXOkowoLpOUcqtJ5tE91N9TlRAmHpaoBYTpt0sjAs6PMgSXg +9bw== 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=2dDB+9T+cFfBaogbFsvXGfbACRsnnW3MZgaVA/BMt2c=; b=Z+sLpo+zUPxCf3MrIK7fyqxKSR+OuCOO6GOiN5C0id+QoxQkeK8iZOyyTu1EUfRA/a OsDQ/BMFazaUdbDcXlkNDOgkORTrhP538VddZGOZFekTCLwx2mDo7w+QWyvPvyGSdHCM EQFsTtc7DOYXtvgXBa9y1r4pF4TYTXt/rzbBhaxrr6yDZESjT3Dub/b2wMU5as62J+nW 1jWEOILALUW1WEeN2dCJN2Z+LLP/h1AccL0LJNauDxxzvFCh2Yefvu6gyRIu7JKiTSJn QUoR6VaGhQI3u35L+8NO5kSrAj7RftjdoDqw0T0RC5P8Ja9rAiHDImClcec3MQX8xqmC apxA== X-Gm-Message-State: AOUpUlEO/dWFpPdSOME1NGrhpezqHFLuBhbcSFJtW7b5y9ZVtYZ5WsC4 JlAIQErURmMr9ZnTKUWEfM97uQ== X-Google-Smtp-Source: AAOMgpe4ktMIAuA7TSGk2yaDBSF5GKZsbd0Xw0Ix4EXzlYNud+oumt830ZBOWH6MFV1Bs4B3a+EJ1Q== X-Received: by 2002:a0c:f1d4:: with SMTP id u20-v6mr20203106qvl.124.1531772051356; Mon, 16 Jul 2018 13:14:11 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([201.186.80.49]) by smtp.gmail.com with ESMTPSA id v192-v6sm4727624qkb.0.2018.07.16.13.14.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Jul 2018 13:14:10 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 1B5227EA; Mon, 16 Jul 2018 16:14:09 -0400 (-04) Date: Mon, 16 Jul 2018 16:14:09 -0400 From: Alvaro Herrera To: Heikki Linnakangas Cc: Andrew Dunstan , Michael Paquier , pgsql-hackers@postgresql.org Subject: Re: [HACKERS] WAL logging problem in 9.4.3? Message-ID: <20180716201409.2qfcneo4qkdwjvpv@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <08b11907-d0b2-c396-2978-ba5aac1972df@iki.fi> User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Jul-12, Heikki Linnakangas wrote: > > > Thanks for the pointer. My tap test has been covering two out of > > > the three scenarios you have in your script. I have been able to > > > convert the extra as the attached, and I have added as well an > > > extra test with TRUNCATE triggers. So it seems to me that we want > > > to disable the optimization if any type of trigger are defined on > > > the relation copied to as it could be possible that these triggers > > > work on the blocks copied as well, for any BEFORE/AFTER and > > > STATEMENT/ROW triggers. What do you think? > > > > Yeah, this seems like the only sane approach. > > Doesn't have to be a trigger, could be a CHECK constraint, datatype > input function, etc. Admittedly, having a datatype input function that > inserts to the table is worth a "huh?", but I'm feeling very confident > that we can catch all such cases, and some of them might even be > sensible. A counterexample could be a a JSON compresion scheme that uses a catalog for a dictionary of keys. Hasn't this been described already? Also not completely out of the question for GIS data, I think (Not sure if PostGIS does this already.) -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services