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 1gPINa-0003Nz-Hw for pgsql-general@arkaria.postgresql.org; Wed, 21 Nov 2018 02:36:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gPINY-0007Ha-0E for pgsql-general@arkaria.postgresql.org; Wed, 21 Nov 2018 02:36:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gPINX-0007Fs-IW for pgsql-general@lists.postgresql.org; Wed, 21 Nov 2018 02:36:35 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gPINQ-0004Lw-HJ for pgsql-general@postgresql.org; Wed, 21 Nov 2018 02:36:34 +0000 Received: by mail-pl1-x642.google.com with SMTP id b5so3180179plr.4 for ; Tue, 20 Nov 2018 18:36:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=G0OqPkRtWt2N9ohLpAyHsoFQP7JyYhrPGL1nUsszzcA=; b=u8s4imyAjIOSqhcfuQoBwKgNnbQVoonUfEDrW4AAVlctZOxk5BTx3+NtkEXXTIJoWU DUSiA1sHP4Rr2XlNJgEQIznPcsAiXM3xh7dw1iomEfM8c3KYGsHhux11lI92BkJ1jn92 GYsLP0bVgZEjABwRNgEJaieAn9LH7FPFZjTZwfeKJZFn1c01NRmjR6FVmgDNiPLFs2R1 JwxC7G5ZpwqRmG/jEEVFAzvFIu7sGCBPFSE5cta+fQ2rDGer8p0vewX+oPnzrkcjJ361 ylwRt/hcuWF02//3TUq9nDJJ2qJ+iU/gEI5S79nzQz4WoVAKUJv7op4ANRncduv+8Z40 P64A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=G0OqPkRtWt2N9ohLpAyHsoFQP7JyYhrPGL1nUsszzcA=; b=a/zPwrszcuxVJ+heKQRLOUCl4rWK/MLu06/0kn0jeNR1ORNwD2cf148k4s7IZVMK7V AvRf3YomfA+BGTFv/scJzk2dOEZ8BPlA5EKrMZDU3qHYscVV5wPgAJA5zVosp3OOtzSO mXARuXsYRozhToRXz/bI5C9n/Ve4KhVDuRIeamGc/JhQxD6esgMSGVHFc5EspQMOGvng 0vSOlzktk6T1nlbMK9Rn7OVWQX+dYyucEFAKtU7jWFlrlrcURzjJ1LylbSYSgGss04JE 5tcQKJuoiQ9o5k8qrJ2KRWhvkLfQbesnzChtFxVbaKlz0IWgUol9XJ+2OCksSFXBj2vW /eBA== X-Gm-Message-State: AA+aEWZU3uLDjp+JrKwj922X/6GQpd3IZYTdYxhl7iXCVOX9aEXY9y5O vtxsDkHdog1Wqc7oHMEXncAGKgK9 X-Google-Smtp-Source: AFSGD/VUfUZ4huWjWFadKne8gdG3SEPXcC4UHxzpkHd2TIYJBs/p3gd0k3PR6MUo2K3ba6JDn6z5EA== X-Received: by 2002:a17:902:b181:: with SMTP id s1-v6mr4976599plr.51.1542767786474; Tue, 20 Nov 2018 18:36:26 -0800 (PST) Received: from ?IPv6:2601:645:4202:82b0:eab1:fcff:fe72:9683? ([2601:645:4202:82b0:eab1:fcff:fe72:9683]) by smtp.gmail.com with ESMTPSA id v12sm48675538pgg.41.2018.11.20.18.36.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 18:36:26 -0800 (PST) Subject: Re: replication lag despite corrective config To: Laurenz Albe , pgsql-general@postgresql.org References: <489acb50e9f4cb043ec4797f338ae06e66c0287c.camel@cybertec.at> From: Wyatt Alt Message-ID: Date: Tue, 20 Nov 2018 18:36:23 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <489acb50e9f4cb043ec4797f338ae06e66c0287c.camel@cybertec.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/19/18 11:09 PM, Laurenz Albe wrote: > With these settings, any conflicting query will be canceled after five > minutes. Perhaps your actual settings are different. > > What do you get for > > SELECT * FROM pg_settings WHERE name = 'max_standby_streaming_delay'; Hi Laurenz, thanks for backing up my understanding. The settings are as I reported: db=> show max_standby_streaming_delay;  max_standby_streaming_delay -----------------------------  5min db=> show hot_standby_feedback; hot_standby_feedback ----------------------  on db=> show max_standby_archive_delay; max_standby_archive_delay ---------------------------  30s db=> select * from pg_settings where name = 'max_standby_streaming_delay'; -[ RECORD 1 ]---+---------------------------------------------------------- name            | max_standby_streaming_delay setting         | 300000 unit            | ms category        | Replication / Standby Servers short_desc      | Sets the maximum delay before canceling queries when a extra_desc      | <> context         | sighup vartype         | integer source          | configuration file min_val         | -1 max_val         | 2147483647 enumvals        | <> boot_val        | 30000 reset_val       | 300000 sourcefile      | <> sourceline      | <> pending_restart | f In case it's of additional interest, the full configs for the replica and the primary are here: https://gist.github.com/wkalt/a33e7628c63bfc71a6d0ee85103302d9 and here: https://gist.github.com/wkalt/a9dd5ceb0b01b50615c51063ee972117.