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 1jh9Hr-0005r1-8F for pgsql-general@arkaria.postgresql.org; Fri, 05 Jun 2020 10:09:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jh9Hq-0001rk-4m for pgsql-general@arkaria.postgresql.org; Fri, 05 Jun 2020 10:09:18 +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 1jh9Hp-0001rd-SU for pgsql-general@lists.postgresql.org; Fri, 05 Jun 2020 10:09:17 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jh9Hn-0000O2-6o for pgsql-general@postgresql.org; Fri, 05 Jun 2020 10:09:17 +0000 Received: by mail-pl1-x62d.google.com with SMTP id d8so276564plo.12 for ; Fri, 05 Jun 2020 03:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=pL73L2g+1ECXPOnJMuM6yPA36+7pekbXEFcimh9JpAo=; b=UG3fbQQIvdNhe2D+IMccjsKagN4v2nCUBtuLLYV2ZpsMcRd2mPonLff1/PiR10TMBQ AQH8Gtq1wG29ZiAboPJxwxrK/Pana45Xs/8M8RmZjOHXGSJwDCzo8eM0ip6eTT4a992i e16HC6nyisyDJACM/ps26M3KyzlG05rQxZYzGX4rAlGo0DfYl11Dsht8TyavXDlqEBd9 zK9RXDmkoClffGB8FVrCT0VoSFyZ7Ssweq2GCR0MUudaYbNshSW95W9LzjavOY/ngtSf N724Fv5UPlYZWMjp0hD6LdWT/4GmKn7drNKaRwnnu8J/ehVWb18RFu5l64vSkedcQbNi YHSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=pL73L2g+1ECXPOnJMuM6yPA36+7pekbXEFcimh9JpAo=; b=Eaae6JtfuhQ/vy6i/3gPbOVLsTxgcLiEoVoOPru/cASweK/K8vzcDkxBVGUGjBuZRK 4hwUfyux1l9zJdmOqx38Dh9UFbVLL9X2EKgOVOgOvflwPOy32aVEXhT/3oRk1c2YYoRo /dblqYogXrWq4iZrAIa6Cm8kFveCxJDP/C7Br+o5GY8jDwxUKuCICYHdAw5/OYb9uWwz 6MZG6P/5Wy2S+1zW832bq4gaV6peDWrgw+s+9G/dlJQ8oSOYsH2b+//iUCDkPqBxyYnP 4Aus+mqal/mGK4QNSl5lCDv8+qmSxDIVkoBBagKboleimaAGPCFJXOutNJjcfXYIDVXI 2Nlg== X-Gm-Message-State: AOAM531ogx0y0nmyg9831ycnF6PJhwGX8T+nqrp3zmiHMEyuq9IK238A ww3MQ3SIARHIncfYSTEIhUJo8QL/ X-Google-Smtp-Source: ABdhPJwumMoMoL8knRiiv7FMEmg9WbxvF3hb7EujtNb79LtRk0OxoTwXCJHeb5rAQ/e6SQelcqTZ9g== X-Received: by 2002:a17:902:6bcb:: with SMTP id m11mr5932128plt.126.1591351752665; Fri, 05 Jun 2020 03:09:12 -0700 (PDT) Received: from ?IPv6:2601:681:5500:dde0:d032:b860:2b25:627? ([2601:681:5500:dde0:d032:b860:2b25:627]) by smtp.gmail.com with ESMTPSA id 2sm7005657pfz.39.2020.06.05.03.09.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Jun 2020 03:09:11 -0700 (PDT) Content-Type: multipart/alternative; boundary=Apple-Mail-5915F5AB-95ED-478B-8236-9C6FA3BCF441 Content-Transfer-Encoding: 7bit From: Rob Sargent Mime-Version: 1.0 (1.0) Subject: Re: Multitenent architecture Date: Fri, 5 Jun 2020 04:09:10 -0600 Message-Id: <45AB91CB-EFBF-40A6-9920-D757AA7F159D@gmail.com> References: Cc: Laurenz Albe , pgsql-general@postgresql.org In-Reply-To: To: Vasu Madhineni X-Mailer: iPhone Mail (17E262) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail-5915F5AB-95ED-478B-8236-9C6FA3BCF441 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > On Jun 5, 2020, at 2:54 AM, Vasu Madhineni wrote:= >=20 > =EF=BB=BF > If the data size is more than 6TB, which approach better? >=20 >> On Fri, Jun 5, 2020 at 2:57 PM Laurenz Albe wr= ote: >> On Thu, 2020-06-04 at 23:52 +0800, Vasu Madhineni wrote: >> > We are planning a POC on multitenant architecture in Postgres, Could yo= u please >> > help us with steps for multitenant using schema for each application mo= del. >>=20 >> For few tenants, you can keep identical tables in several schemas and >> set "search_path" to select a tenant. >>=20 >> With many tenants, you are better off with one table that holds the >> data for all clients. You can use Row Level Security to have each >> tenant see only his or her data, and it might be a good idea to >> use list partitioning on the tenant ID. >>=20 >> Yours, >> Laurenz Albe >> --=20 >> Cybertec | https://www.cybertec-postgresql.com >>=20 The question is How many separate data owners?= --Apple-Mail-5915F5AB-95ED-478B-8236-9C6FA3BCF441 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable


On Jun 5, 2020, at 2:54 AM, Vasu Madhineni &l= t;vasumdba1515@gmail.com> wrote:

=EF=BB=BF
If the data size is m= ore than 6TB, which approach better?

On Fri, Jun 5, 2020 at 2:57 PM Laure= nz Albe <laurenz.albe@cyberte= c.at> wrote:

With many tenants, you are better off with one table that holds the
data for all clients.  You can use Row Level Security to have each
tenant see only his or her data, and it might be a good idea to
use list partitioning on the tenant ID.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

The question is How many separate data owners?= --Apple-Mail-5915F5AB-95ED-478B-8236-9C6FA3BCF441--