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 1hgTo1-000064-6W for pgsql-general@arkaria.postgresql.org; Thu, 27 Jun 2019 12:47:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hgTny-0006sW-IM for pgsql-general@arkaria.postgresql.org; Thu, 27 Jun 2019 12:47:10 +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 1hgTny-0006sP-8b for pgsql-general@lists.postgresql.org; Thu, 27 Jun 2019 12:47:10 +0000 Received: from mail-qt1-f172.google.com ([209.85.160.172]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hgTnu-00045f-SL for pgsql-general@lists.postgresql.org; Thu, 27 Jun 2019 12:47:09 +0000 Received: by mail-qt1-f172.google.com with SMTP id s15so2216065qtk.9 for ; Thu, 27 Jun 2019 05:47:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=bZ6qmztrGmZ+37YndXd5tKyzjkUzEV/XbasRzOmBYrg=; b=cvJdY47niJhrO3dHn/VHGxO7a/afRvoP1YVj5XlAu9M9lkwErbchvYgZPaTvopTg6s ECL6BQAehDCsR7wm5lQyyxyiApDzLSMPrBT5+bZME2LOsXL3yhxPqxpME+fc1FCtKaqn IsdMzMScslxQR1y/i7i/Gjfu0vYvtwiY9sxMkU7kkVNoIMFN+HI4+bPRLGJ3v+MW3JN8 CziJnFuppClLHdkVyM/zuySB0psOjoqIcm+SN+hAbEwFKkT8bCgu+SUUEtLz6RpFXMmy yx7SMV7TiKD8mIX+yL0TGTdLCS6kgR1agdcujf9c9D4UdZNuXEHY/W081vjp+1OEj0IO c42w== X-Gm-Message-State: APjAAAWbt3axYCrq5IVeqSoUg+s/W54p7gvYaVKLH32UA3XIrL+qm5F4 9KOl7YG3BTcC4d0PpEji3Xr7nLUKNkRHwQ== X-Google-Smtp-Source: APXvYqyrGr/8expX+x3rDPIgQv8L4vg4Xo4S/9khx/7J8UmepfVYjcsyFlk05dwfeLt033tU0LNHkg== X-Received: by 2002:a0c:a8d1:: with SMTP id h17mr2930975qvc.117.1561639624153; Thu, 27 Jun 2019 05:47:04 -0700 (PDT) Received: from localhost.localdomain (c-24-61-8-151.hsd1.ma.comcast.net. [24.61.8.151]) by smtp.gmail.com with ESMTPSA id u126sm782801qkf.132.2019.06.27.05.47.02 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 05:47:03 -0700 (PDT) Reply-To: jesper.pedersen@redhat.com Subject: Re: pg_receivelwal vs synchronous To: Magnus Hagander Cc: pgsql-general References: <94c4d130-8efa-35c4-ba86-789f2cd9acfa@redhat.com> From: Jesper Pedersen Organization: Red Hat Message-ID: <5ad8cb19-de33-287c-fd0a-dd822da81e65@redhat.com> Date: Thu, 27 Jun 2019 08:47:02 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Magnus, On 6/27/19 8:37 AM, Magnus Hagander wrote: >> What am I missing here ? >> > > I believe your problem is remote_apply. > > pg_receivewal never *applies* any WAL, so it just updates the write and > flush locations. Notice how the replay_lsn remains NULL. > > So you need synchronous_commit to be 'on' or 'remote_write', not > 'remote_apply'. > Yeah, remote_write works :) I'll a patch for the pg_receivewal documentation to make this more clear. Thanks ! Best regards, Jesper