Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8AOP-0003mM-OC for pgsql-hackers@arkaria.postgresql.org; Tue, 09 May 2017 19:01:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d8AON-0007Rs-S3 for pgsql-hackers@arkaria.postgresql.org; Tue, 09 May 2017 19:01:51 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d8AMr-0004ir-O1 for pgsql-hackers@postgresql.org; Tue, 09 May 2017 19:00:17 +0000 Received: from mail-wr0-x235.google.com ([2a00:1450:400c:c0c::235]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d8AMj-0003SH-06 for pgsql-hackers@postgresql.org; Tue, 09 May 2017 19:00:17 +0000 Received: by mail-wr0-x235.google.com with SMTP id l50so11980878wrc.3 for ; Tue, 09 May 2017 12:00:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=KfAAz5x6A3j7gG8fTh8FQ3kB9uD0NaYIWgYQ4/amTwo=; b=wg0GYUMiIHaBKCOloHNEqczYnCXtLrSDHjhfYq8U/H/p5zAGBsnMLqvz2n7HgU4XHU 8lj1ClXkIWu5MtI0AKEqv7vItgMmoyjKzdRYZzhgd4V9dQBXgKKJCxT3USXAPFhrABtg 0gDvB3MYDjerqAfqptvHd6x4n4N9dx1c3TqO45ffZpZMqdim0+RoC4jKxPVF2gZ3Fq/3 6sM98zjzPrKBwi+3XociyyDI19/6jxa0EsadvGsWHl+kNYQSAwm+osMLYPyhpl6AN/Mr uU7pJwpf7fcQViZMO+HQQwywoy6Odck8Ak5ZqS0wmU6nt+yKVFpnAVneH/a6BD0vq7bT JASg== 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:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=KfAAz5x6A3j7gG8fTh8FQ3kB9uD0NaYIWgYQ4/amTwo=; b=BC0fuNVuYYJbsgO7vChsL9CQ/JkprV8n1XjjCdX8p9nqBg5aWAnuQDcp4CvyqwamqG nd+rY3+Tp9y65llOQScAxCMXCMo/Ens7jWztjIO3TrCZHetBuYEE6utuoBGq1cwHDX+1 UTTcPCyogWtw6dIjzOLHGR8ybfvrwK9lKXYpL/IhNXIEeNV/W7PMaNfD+eLeot0TuNKb lxedp5cCQ2zr7vqRtIjee4PS9kRpr2bAfJNLgcEG4y6NOzpn9wqV0BsKIrXzhmltauO9 W6nzDkUBlAKBtH8cbkQZS5Hr8P/c3mGm2d1A3e8Tgzxw+lrvBi9lML5SKo/LNjJvzBv8 zwfw== X-Gm-Message-State: AODbwcDPIy+LRniEnZ+yLxTZ7EOBE6B33Wbv9/xwhCjL0OTt+oJ3iIvV exfI8p6Q9bvX/A8neKLetg== X-Received: by 10.223.160.219 with SMTP id n27mr1070640wrn.201.1494356407920; Tue, 09 May 2017 12:00:07 -0700 (PDT) Received: from [192.168.0.105] (150.123.broadband11.iol.cz. [90.178.123.150]) by smtp.gmail.com with ESMTPSA id z14sm1935059wmz.2.2017.05.09.12.00.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 May 2017 12:00:06 -0700 (PDT) Subject: Re: snapbuild woes To: Erik Rijkers References: <20170413002959.apytyi5lkknauauj@alap3.anarazel.de> <0d06dfc1-0bc5-c3ab-3555-24e2f275d7fa@2ndquadrant.com> <30242bc6-eca4-b7bb-670e-8d0458753a8c@2ndquadrant.com> <20170501005921.qcqd7w2njpv3av6s@alap3.anarazel.de> <20170501013529.sejtgo2acxbvq26q@alap3.anarazel.de> <209861fc-718f-0a7b-3a1d-36512865c209@2ndquadrant.com> <20170501080348.vb6mj5whdex3f7l7@alap3.anarazel.de> <20170501191419.coqbtx2jodu22ufz@alap3.anarazel.de> <20170505000004.gihrtl7bhxeolf3q@alap3.anarazel.de> <076a3e4c3d4fef091522d3cd7e50c7eb@xs4all.nl> <46835ad4-ce7d-ae45-bfdd-9e5f79d33a89@2ndquadrant.com> <169b7d221f3236b7cb790c8dd323dbe0@xs4all.nl> <4ff19c9f-96ed-40ee-14f4-6286a56b5ac8@2ndquadrant.com> <84a48a73304ed5363433ec4b9fbb4438@xs4all.nl> Cc: Andres Freund , PostgreSQL-development , Robert Haas , Craig Ringer From: Petr Jelinek Message-ID: <7d3b9bb1-41a9-1f9a-43ca-c4bb271333a1@2ndquadrant.com> Date: Tue, 9 May 2017 21:00:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <84a48a73304ed5363433ec4b9fbb4438@xs4all.nl> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 09/05/17 19:54, Erik Rijkers wrote: > On 2017-05-09 11:50, Petr Jelinek wrote: > >> I rebased the above mentioned patch to apply to the patches Andres sent, >> if you could try to add it on top of what you have and check if it still >> fails, that would be helpful. > > It still fails. > > With these patches > > - 0001-WIP-Fix-off-by-one-around-GetLastImportantRecPtr.patch+ > - 00002-WIP-Possibly-more-robust-snapbuild-approach.patch + > - fix-statistics-reporting-in-logical-replication-work.patch + > - Skip-unnecessary-snapshot-builds.patch > > built again on top of 44c528810a1 ( so I had to add the > 'fix-statistics-rep*' patch because without it I immediately got that > Assertion failure again ). > > As always most runs succeed (especially on this large 192GB 16-core > server). > > But attached is an output file of a number of runs of my > pgbench_derail2.sh test. > > Overal result: > > -- out_20170509_1635.txt > 3 -- pgbench -c 64 -j 8 -T 900 -P 180 -n -- scale 25 > 2 -- All is well. > 1 -- Not good, but breaking out of wait (21 times no change) > > I broke it off after iteration 4, so 5 never ran, and > iteration 1 failed due to a mistake in the harness (somethind stupid I > did) - not interesting. > > iteration 2 succeeds. (eventually has 'replica ok') > > iteration 3 succeeds. (eventually has 'replica ok') > > iteration 4 fails. > Just after 'alter subscription sub1 enable' I caught (as is usual) > pg_stat_replication.state as 'catchup'. So far so good. > After the 15-minute pgbench run pg_stat_replication has only 2 > 'startup' lines (and none 'catchup' or 'streaming'): > > port | pg_stat_replication | pid | wal | replay_loc | diff | > ?column? | state | app | sync_state > 6972 | pg_stat_replication | 108349 | 19/8FBCC248 | | | > | startup | derail2 | async > 6972 | pg_stat_replication | 108351 | 19/8FBCC248 | | | > | startup | derail2 | async > > (that's from: > select $port1 as port,'pg_stat_replication' as pg_stat_replication, pid > , pg_current_wal_location() wal, replay_location replay_loc, > pg_current_wal_location() - replay_location as diff > , pg_current_wal_location() <= replay_location > , state, application_name as app, sync_state > from pg_stat_replication > ) > > This remains in this state for as long as my test-programs lets it > (i.e., 20 x 30s, or something like that, and then the loop is exited); > in the ouput file it says: 'Not good, but breaking out of wait' > > Below is the accompanying ps (with the 2 'deranged senders' as Jeff > Janes would surely call them): > > > UID PID PPID C STIME TTY STAT TIME CMD > rijkers 107147 1 0 17:11 pts/35 S+ 0:00 > /var/data1/pg_stuff/pg_installations/pgsql.logical_replication2/bin/postgres > -D /var/data1/pg_stuff/pg_installations > rijkers 107149 107147 0 17:11 ? Ss 0:00 \_ postgres: > logger process > rijkers 107299 107147 0 17:11 ? Ss 0:01 \_ postgres: > checkpointer process > rijkers 107300 107147 0 17:11 ? Ss 0:00 \_ postgres: > writer process > rijkers 107301 107147 0 17:11 ? Ss 0:00 \_ postgres: wal > writer process > rijkers 107302 107147 0 17:11 ? Ss 0:00 \_ postgres: > autovacuum launcher process > rijkers 107303 107147 0 17:11 ? Ss 0:00 \_ postgres: stats > collector process > rijkers 107304 107147 0 17:11 ? Ss 0:00 \_ postgres: > bgworker: logical replication launcher > rijkers 108348 107147 0 17:12 ? Ss 0:01 \_ postgres: > bgworker: logical replication worker for subscription 70310 sync 70293 > rijkers 108350 107147 0 17:12 ? Ss 0:00 \_ postgres: > bgworker: logical replication worker for subscription 70310 sync 70298 > rijkers 107145 1 0 17:11 pts/35 S+ 0:02 > /var/data1/pg_stuff/pg_installations/pgsql.logical_replication/bin/postgres > -D /var/data1/pg_stuff/pg_installations > rijkers 107151 107145 0 17:11 ? Ss 0:00 \_ postgres: > logger process > rijkers 107160 107145 0 17:11 ? Ss 0:08 \_ postgres: > checkpointer process > rijkers 107161 107145 0 17:11 ? Ss 0:07 \_ postgres: > writer process > rijkers 107162 107145 0 17:11 ? Ss 0:02 \_ postgres: wal > writer process > rijkers 107163 107145 0 17:11 ? Ss 0:00 \_ postgres: > autovacuum launcher process > rijkers 107164 107145 0 17:11 ? Ss 0:02 \_ postgres: stats > collector process > rijkers 107165 107145 0 17:11 ? Ss 0:00 \_ postgres: > bgworker: logical replication launcher > rijkers 108349 107145 0 17:12 ? Ss 0:27 \_ postgres: wal > sender process rijkers [local] idle > rijkers 108351 107145 0 17:12 ? Ss 0:26 \_ postgres: wal > sender process rijkers [local] idle > > I have had no time to add (or view) any CPUinfo. > > Ah okay, so this is same issue that's reported by both Masahiko Sawada [1] and Jeff Janes [2]. [1] https://www.postgresql.org/message-id/CAD21AoBYpyqTSw%2B%3DES%2BxXtRGMPKh%3DpKiqjNxZKnNUae0pSt9bg%40mail.gmail.com [2] https://www.postgresql.org/message-id/flat/CAMkU%3D1xUJKs%3D2etq2K7bmbY51Q7g853HLxJ7qEB2Snog9oRvDw%40mail.gmail.com -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers