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 1jNxTS-0007Ev-3x for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Apr 2020 11:41:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jNxTQ-0003ww-Tk for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Apr 2020 11:41:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jNxTQ-0003wp-Kq for pgsql-bugs@lists.postgresql.org; Mon, 13 Apr 2020 11:41:56 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jNxTN-0003w8-PV for pgsql-bugs@lists.postgresql.org; Mon, 13 Apr 2020 11:41:55 +0000 Received: by mail-wr1-x442.google.com with SMTP id x18so5516703wrq.2 for ; Mon, 13 Apr 2020 04:41:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=7zOBOLh4ybe5TretfQvMsM2vhxlNaYYP+I2g5mrLd68=; b=mPVPcJsShAcAEjy8Ejfb0kVxDduzrCXzQ8A2egmngAfF2VaB+AzVYp52v34+eG49P4 bT8wu3NptApPE7hBWA8gHCU1mUqIxyp48Ojs7wuU+spVrOV5kK4LxL9JxcRABhe5ISci NXnsAa4wIiXCcRH7KTVrdrdG+kU6Ege1P9ID329ERw5xSW5yX3HGanKiT1CkgfhA65ix B/+jmAzDt5pZ+7bk3BHy6f7f8DXWgLnzuSFdvCfCvcf7J6c/D5f1XGjHCd5KGzrfBZw6 Jw5z2qmMSBwNYjuHB24kwoyMJhFRLBCK6Bj69gKVQNc/rEiMmRfuOrbOUDcRZT0Pc9aK rRhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=7zOBOLh4ybe5TretfQvMsM2vhxlNaYYP+I2g5mrLd68=; b=Q5iQnaSL7cgnQG4FVM6nha980fjdAgcObsXKUpKam51H8XV7JOm1jiNQv0hOtr30xK Ag5L93yVTrUR6SkssKp8wdtt9GBxyrnKhoc/0VPgrl/gOZ6xGWs9Wm2pOFrT/N95iMbw dUcSNmMpHCspOTLiiEXY6vDBbXSoZ8OffCB3dc5GUrfvqGGadPu5mvHY8AnZM/ZhS4ZO vI2anwt+nGq3xt64hDoBEcBWiDpzh7GorjkEfmMcjMVITgFlzI+wACRZ0/5oGQIVZm6X gi8jf6RTRhc5BCe8HuiSehDid6G3ydVM5Wv5zERXZjeiHXGjzUjoQDTmSZ8xUu89WL/R PEqw== X-Gm-Message-State: AGi0PuZibEYYb4WdPIDI/D97/uzv0kLmIgiWq6wAofFpI8fI9nB+eWhT oYifnPjZGxdJ+KSSOXx0JEaSuA== X-Google-Smtp-Source: APiQypIMAbcpFZZmdnadKzDAvRlfc8Lv00mZGc+Rrh3KMgSpHGTpyAR75KomhVbobIHfIZxPuLxOlw== X-Received: by 2002:a5d:4b90:: with SMTP id b16mr8092968wrt.16.1586778111610; Mon, 13 Apr 2020 04:41:51 -0700 (PDT) Received: from localhost (ip-86-49-253-141.net.upcbroadband.cz. [86.49.253.141]) by smtp.gmail.com with ESMTPSA id y5sm15218707wru.15.2020.04.13.04.41.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Apr 2020 04:41:50 -0700 (PDT) Date: Mon, 13 Apr 2020 13:41:47 +0200 From: Tomas Vondra To: Kamil =?utf-8?B?Sm/FhGNh?= Cc: pgsql-bugs@lists.postgresql.org Subject: Re: backend crash Message-ID: <20200413114147.a42vf3tr3auybdtr@development> References: <87imi37spc.fsf@alfa.kjonca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87imi37spc.fsf@alfa.kjonca> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Apr 13, 2020 at 09:25:35AM +0200, Kamil Jońca wrote: > >I have problem with (pseudo) random backend crashes. >They seems to happen at one query, but not every time. > >table: > >--8<---------------cut here---------------start------------->8--- >CREATE TABLE digitalocean.log ( > ts timestamp with time zone DEFAULT now() NOT NULL, > actions jsonb NOT NULL, > account text NOT NULL >); > >ALTER TABLE ONLY digitalocean.log > ADD CONSTRAINT log_ts_key UNIQUE (ts); >--8<---------------cut here---------------end--------------->8--- > >query: >--8<---------------cut here---------------start------------->8--- >with x as (select jsonb_array_elements (actions->'actions')->'id' as id ,ts from digitalocean.log where account='onet') select max(x.id::bigint) from x; >--8<---------------cut here---------------end--------------->8--- > I've tried to reproduce this, but unfortunately it does not fail for me. Chances are this depends on data. Can you prepare a small data sample that would trigger the issue? regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services