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 1hAyv5-0001VF-35 for pgsql-admin@arkaria.postgresql.org; Mon, 01 Apr 2019 15:32:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hAyv2-0003Vq-Eq for pgsql-admin@arkaria.postgresql.org; Mon, 01 Apr 2019 15:32:16 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hAyv2-0003TY-1A for pgsql-admin@lists.postgresql.org; Mon, 01 Apr 2019 15:32:16 +0000 Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hAyuz-0007y4-S9 for pgsql-admin@lists.postgresql.org; Mon, 01 Apr 2019 15:32:15 +0000 Received: by mail-ot1-x32c.google.com with SMTP id 64so8950607otb.8 for ; Mon, 01 Apr 2019 08:32:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=G/kD6O2MiBu45vorYfoJN6F0xMsqI01OgsC97PyVJzU=; b=OqpIYWviRKoFkMCLJRQAU39za1e2Cbmc5cQI1tojbbo/aHuCzlFOFeYMBHxygXppyQ 4qw0fEwXGljsY42XWD7V2PIq8RB/+O0tnqSTmVMqJATAqyD+fVTWBhl2pvYg0BXqph8t yiZWUgKWYZmyOmpDs8SfIciAQVANo8zskrp5RbJB9AHEmEe4xAxAGw0UrbgGpeTGSSNg PyuOiABcxWvIpPJ1psRwxPypzs+srqC2eBFn3sK2CqTnXMCNGTC6ZEo7Tc4Vsk/pT2dP ScPC9jWuSmOo3lGCDD/cLlTAZXhYy7vV2tRkm91S231uEBxUinjFeNssQYLTvK8ctPzF s2MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G/kD6O2MiBu45vorYfoJN6F0xMsqI01OgsC97PyVJzU=; b=WaqSAWyUqv2abzGW9ILntDmi/vNIZSGdcUFA16wOBiXFVmnCm0RgQp544GNpC8F+MZ eJgtbkkGf0a+nBzbpNrAtsoYS3x3+MD3RIkB9mYzxuHAi+l6sHFmkY5pDON5V2ttpfMj mTZ4dZjrx+JN0Q0l5WX2fqdrDLJTkZZ12o9rgBYstNc0q4cCSJIJsxEOl/M8lN5vUTvj SCHAxyGOUkuF4KpGF+DP8KALCfqhvlQBzVgAVbbNBMb96tz4bEWiba48h4S0K7OK6b/1 YppVyBvLJ7G0ocykvnw1lKTSpzn20p2JZf/o112y/yLbuCZrvRCcXI3PrtC4MGuBYU4D 3sPw== X-Gm-Message-State: APjAAAVabCG7x/sbImgH6W+YM6K2CndzBZVS1+GO9c6/j4PZQ2eD6xoF 7oDp9Ld+/rgLD7q0Q/ji/Aj0lXet+nc= X-Google-Smtp-Source: APXvYqz8NfNfg/Gpe2ELTbHHZumIKYwEqb+yR9/aZg5dzZ6xJlpiGUxio5FwJC5XLws5zEzS75WM8Q== X-Received: by 2002:a05:6830:13cd:: with SMTP id e13mr47292493otq.139.1554132731392; Mon, 01 Apr 2019 08:32:11 -0700 (PDT) Received: from frodriguez-hp-notebook.localnet ([189.208.128.209]) by smtp.gmail.com with ESMTPSA id w141sm4264132oie.1.2019.04.01.08.32.10 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Apr 2019 08:32:10 -0700 (PDT) From: Frank Alberto Rodriguez To: pgsql-admin@lists.postgresql.org Subject: Re: Materialize view in slave server Date: Mon, 01 Apr 2019 09:32:03 -0600 Message-ID: <1870914.oP4ivU0TkW@frodriguez-hp-notebook> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello. If you planned to writes over materialized views, you should use the primary server, because the slave must be to read only. If you want to avoid writes in the slave, use normal views instead, otherwise ensure the writes over a materialized view occur in a primary node only, but reading it on slave node would not be a problem. Regards On lunes, 1 de abril de 2019 09:02:13 CST Mahmoud Moharam wrote: > Hello All , > hope every thing is well with you all , > I planned to run stream replication (primary / slave) on my environment , > and want to make writes on primary and reads from slave , so the question > is :- I have Materialize view running on primary , what is the best choose > to run Materialize view on primary or on slave ? > > thanks all