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 1g9bha-0004sU-3E for pgsql-performance@arkaria.postgresql.org; Mon, 08 Oct 2018 20:00:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g9bhY-0002BR-Kv for pgsql-performance@arkaria.postgresql.org; Mon, 08 Oct 2018 20:00:24 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g9bhY-0002BJ-5x for pgsql-performance@lists.postgresql.org; Mon, 08 Oct 2018 20:00:24 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g9bhU-0007j0-My for pgsql-performance@lists.postgresql.org; Mon, 08 Oct 2018 20:00:22 +0000 Received: by mail-wr1-x444.google.com with SMTP id x12-v6so22114823wru.8 for ; Mon, 08 Oct 2018 13:00:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=2pOPWKCGqM8FIJzIlNAqG7qOPBDiJ0pfucY6WT3j8SM=; b=0c2WSEB6vHoafJng+Yk+lyxhFRrXhelqFJl+WtxjzSaZdd3TGsH0Vvz1JH5NdPsz1p i/hruVHMxwlma685rhMupdULOAL7KwYWYAH4XSAQamzA3KWv79zHsiDrocPYLVApsMDP 8J59LxoN2VML7ay0pHiPN4PUQDunikE78HP51TJv4MEZnp1VdDd7ce/lpNNzgOm4n9bp d7FVcU8NmM/CIil7iNu7YXsSueFilKqTBTGN8msa4w3Ei0lRYaH936BBxWoi56qxIJ9F gS6WiZR8FewA2vS37jODqNleJnEjEcfMCHNkgONkx0OOJoGndvn8IVAgXQr1+l+B08Gn 7lAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2pOPWKCGqM8FIJzIlNAqG7qOPBDiJ0pfucY6WT3j8SM=; b=Ky8rK3hTmkCziL9pnY7CKcKn6qym/GPCVjvXV3XKvmB3z2yRXT6622tSNNw5xxLRmg fC4zFmd05CfgMrjylmHA78u0fdLXWAUJoK1oO3YecXeNgzCDTCJRg+ysFkW/aoHUaHEX 9Kx8ckRFC72oeY3SQOopU91AdyS+4iagAexOJ0wfgzF9pLygP/z77yf+SlnhySjlmZz/ xiuWTO6tUUwQZ2nheyoM/VDTG0OrfpPkuzatl88uPDY/Gmugv/vmNSzr0/Tk4ajqNg3z cNwiEUXwjmemlU85z1h09P85kEo9IyDRqMUWg3mCrf3T2ml0KTBDlxz7LyS6rrdXdewE N2sg== X-Gm-Message-State: ABuFfohmj0MJykHV2p2R5/wAIlIj7NOwSNwR4y4Jue03Y+6gXxSBEMQY u9PLeooxwbXWhnc1ozy824Mqgw== X-Google-Smtp-Source: ACcGV636KF69EO2HOLXr1qWN1u117sTn9rtk5D1EIDiWt4V9vTC1/ZW+10xNyAU9InoTluhJoHbJ9A== X-Received: by 2002:a5d:4b84:: with SMTP id b4-v6mr18461368wrt.168.1539028818803; Mon, 08 Oct 2018 13:00:18 -0700 (PDT) Received: from [10.137.2.19] (ip-86-49-251-104.net.upcbroadband.cz. [86.49.251.104]) by smtp.gmail.com with ESMTPSA id r16-v6sm24233966wrv.21.2018.10.08.13.00.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Oct 2018 13:00:18 -0700 (PDT) Subject: Re: Why the index is not used ? To: ROS Didier , "folarte@peoplecall.com" Cc: "pavel.stehule@gmail.com" , "pgsql-sql@lists.postgresql.org" , "pgsql-performance@lists.postgresql.org" , "pgsql-general@lists.postgresql.org" References: <74090066a33740ea8fc442cc70f8afa2@PCYINTPEXMU001.NEOPROD.EDF.FR> <3a14f7f8fbda4e868b663b31e8c5fa16@PCYINTPEXMU001.NEOPROD.EDF.FR> <88005798-8b90-3535-cc1c-a915a9e12d17@2ndquadrant.com> <28893ac2b3df41a89ba4266bad6e43ce@PCYINTPEXMU001.NEOPROD.EDF.FR> From: Tomas Vondra Message-ID: Date: Mon, 8 Oct 2018 22:00:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <28893ac2b3df41a89ba4266bad6e43ce@PCYINTPEXMU001.NEOPROD.EDF.FR> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 10/08/2018 04:10 PM, ROS Didier wrote: > Hi Tomas >         >         Thank you for your answer and recommendation which is very > interesting. I'm going to study the PCI DSS document right now. > > * Here are my answer to your question : > > />>/ > /What is your threat model?/ > /< we want to prevent access to sensitive data for everyone except those > who have the encryption key. > in case of files theft, backups theft, dumps theft, we do not want > anyone to access sensitive data. >        The thing is - encryption is not panacea. The interesting question is whether this improves security compared to simply using FDE and regular access rights (which are grantable at the column level). Using those two pieces properly may very well be a better defense than not well designed encryption scheme - and based on this discussion, it does not seem very polished / resilient. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services