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 1nA7Gj-0004G9-TD for pgsql-bugs@arkaria.postgresql.org; Wed, 19 Jan 2022 09:28:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nA7Gi-0005xA-QJ for pgsql-bugs@arkaria.postgresql.org; Wed, 19 Jan 2022 09:28:40 +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 1nA7Gi-0005x1-GR for pgsql-bugs@lists.postgresql.org; Wed, 19 Jan 2022 09:28:40 +0000 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nA7Gg-0003IQ-6B for pgsql-bugs@lists.postgresql.org; Wed, 19 Jan 2022 09:28:39 +0000 Received: by mail-pj1-x102d.google.com with SMTP id l16so1952998pjl.4 for ; Wed, 19 Jan 2022 01:28:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=2JFWpnMpbyQjqa+C6z3EZisuErVsgUgf0lETkUQpFjA=; b=DnOFZDuf5/WfWTBdaNwM21JdD8pMOsC+VDtwxbsl+3fZkpsZ+Pv7DC/MyuQml1oZAd +X8yvm6Zd/Mza0oqYshW9tFl5WG3bACbW8WLid55crYbQByGV2/1zw5mQIlLCiAZqJnP ItPIhhMOKX92hsNlOTnLnpUqr2SuUoZhpttso6sZXCGko4B/J9oSvf4JZTAdTX7PwNaU 7gvDF1dzeH3l4Zfhs8yzwFbYBTS+JgBkcbGxC5hXTCyBll2uuYdk0t/5UtqEHUVRUz/h iij/af7EB84a0jqAuFyMlK91PveTtD4iBpjyTAI91b2ExTIiPTa1EcEQcGLo32wVpoz4 bRqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2JFWpnMpbyQjqa+C6z3EZisuErVsgUgf0lETkUQpFjA=; b=jbX0ziNViyNkz768C8gjG1luLVur1+Yz010Bjz6A/L9Xjwc0pZOZawbFAfVP1uD3Gd YqEgsjYMAk7xKObW33wU2E7Jv7FqhYICDNVWoOJu7AFsbr6YY0BgURrYxpcbhV+7cyOB oy5ouGQfCYVB2vD79bMqkLDc26b373+HTnxP9E6O42qDwyTBTnfvzQXHELoro/MBNrva Ead78TQKVGXMrqm//wnjclKk5ribMzSF9ezGUv7Gxz2vm+dNOhIHTVSbBe/w+r2ld0sB dZz9Dq6r/fPJZGmodqxMiY3a0LFV8mEiVMjGVHa00QvPu98Imnczi/xLFWxOcHBOf5K1 Y8xg== X-Gm-Message-State: AOAM533CZDeE5p6p+wxrfT+motf0gAlAaMqJ1BluGEhJPSDvU8EfP7ev qvQxCex/rogyND+i2CU1/po= X-Google-Smtp-Source: ABdhPJx1HoLSplyxl8QBuQ499+A0S6T73+Ab2bG+fR6VlJgBbiGM1YJJ/BpQb08zdBpTZt/yO6nIhw== X-Received: by 2002:a17:902:db0b:b0:14a:58c2:c27a with SMTP id m11-20020a170902db0b00b0014a58c2c27amr32042320plx.61.1642584516988; Wed, 19 Jan 2022 01:28:36 -0800 (PST) Received: from jrouhaud (1-171-184-213.dynamic-ip.hinet.net. [1.171.184.213]) by smtp.gmail.com with ESMTPSA id mi14sm5514450pjb.28.2022.01.19.01.28.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jan 2022 01:28:36 -0800 (PST) Date: Wed, 19 Jan 2022 17:28:28 +0800 From: Julien Rouhaud To: rekgrpth@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17370: shmem lost on segfault Message-ID: <20220119092828.aiy3sqoa4lwwtm2g@jrouhaud> References: <17370-a42a313cf1589256@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17370-a42a313cf1589256@postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Wed, Jan 19, 2022 at 03:05:56AM +0000, PG Bug reporting form wrote: > The following bug has been logged on the website: > > Bug reference: 17370 > Logged by: RekGRpth > Email address: rekgrpth@gmail.com > PostgreSQL version: 14.1 > Operating system: docker alpine > Description: > > In developing my https://github.com/RekGRpth/pg_task I found strange > behavior of shared memory segment. This is not a postgres bug. If you need help with developing an extension you should send a message to -hackers. That being said, in case of unclean shutdown (which happens if a process segfaults), the postmaster will restart and any shared memory will be lost, so I'm assuming that you somehow serialize a handle which isn't valid anymore after a restart, unclean or not.