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 1gvSiS-0005pH-7t for pgsql-hackers@arkaria.postgresql.org; Sun, 17 Feb 2019 20:07:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gvSiQ-0007M7-M7 for pgsql-hackers@arkaria.postgresql.org; Sun, 17 Feb 2019 20:07:06 +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 1gvSiQ-0007Ly-BW for pgsql-hackers@lists.postgresql.org; Sun, 17 Feb 2019 20:07:06 +0000 Received: from mail-it1-x144.google.com ([2607:f8b0:4864:20::144]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gvSiN-0008ML-3W for pgsql-hackers@postgresql.org; Sun, 17 Feb 2019 20:07:04 +0000 Received: by mail-it1-x144.google.com with SMTP id v72so36421256itc.0 for ; Sun, 17 Feb 2019 12:07:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rlSCdjCPMqKNcxvtq5YZgU9xAQzJIwmEQfK2TiUmDC0=; b=FHBNwZQrKeYDErh370C0Jlf6X5IVIb8dnYMPYOFRSaFsy2STHZveR0tx0I0yMUg+V7 yMw5VJBX9YeVR3YuK9usByCEdxEB54CNO6mrc676mTap+TydOLY5wC3gSxt3aSzZLXh7 WiZ2RQNxqxn+HDdWipUs8t5PnKZHc/eyppcMEJA88aAd8NgfI8oK7DJpMFwT7jDFRs85 zjG9du8gcAmWuhf6zE4b3svhfiV4GfEpxx6T5xCLPDYrrHlbWeAzN9in+a7M15AyOL/6 gnx5xktVnRNQhWxst8dLXBt2WCiaDxGBHSJL6mhDZs7NXf7thfgAfdxtrN08TBgja0hb zqiA== 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:in-reply-to:user-agent; bh=rlSCdjCPMqKNcxvtq5YZgU9xAQzJIwmEQfK2TiUmDC0=; b=M2tFiojtJmyxKc+UA04YNaCgYVmni/wHN5fYz3IBxX3n1BTIybjHssyjlzgckS/att ZITGjPQ6sf8PoDH3WKPyJJaRbTmq6cs6gLG0Vr9LKuoKYSfsXF8ryy7FdeN7CL4U8UF7 PMydDDHoKzCmMNUykSmZf78vE3vAb8R7pfujOXdjsX+Qv6HDeliY5XFav1deoNfFE3UE QLGZEuywMbfJQLmnIVtYxyNEgtJ3Vq+xoerlzUzpbKj/XHZG5RSzw+bE/WCjcCxdMoyx CB7JW901QpzylVsIWKJ3CQgt1g1BLKZevKOqvvDIrX91t0wsGqFISh1RjqJMzMJdvPu8 Vp/w== X-Gm-Message-State: AHQUAuaCPFdFVB+mo1lLUjPKbp/hgjMhKpk6hy2C+qbPGrbXBfzjlru/ PhGcYbfII0UFtWTu9nTe3+u2uA== X-Google-Smtp-Source: AHgI3IaFteqKU7qocAWNdgISbmPeublMLUjGCn+LqhiM4x3TqiukGxhMFsvIVDXELXYH1blQ7gSeOA== X-Received: by 2002:a5d:8c98:: with SMTP id g24mr8014261ion.103.1550434022424; Sun, 17 Feb 2019 12:07:02 -0800 (PST) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id j133sm5661469itj.16.2019.02.17.12.07.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Feb 2019 12:07:01 -0800 (PST) Received: by pryzbyj (Postfix, from userid 1000) id 52F84800B7B; Sun, 17 Feb 2019 14:07:00 -0600 (CST) Date: Sun, 17 Feb 2019 14:07:00 -0600 From: Justin Pryzby To: Thomas Munro Cc: pgsql-hackers@postgresql.org Subject: Re: REL_11_STABLE: dsm.c - cannot unpin a segment that is not pinned Message-ID: <20190217200700.GB28750@telsasoft.com> References: <20190216023854.GF30291@telsasoft.com> <20190216043107.GG30291@telsasoft.com> <20190217194145.GA28750@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190217194145.GA28750@telsasoft.com> User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sun, Feb 17, 2019 at 01:41:45PM -0600, Justin Pryzby wrote: > On Sat, Feb 16, 2019 at 09:16:01PM +1300, Thomas Munro wrote: > > On Sat, Feb 16, 2019 at 5:31 PM Justin Pryzby wrote: > > > Thanks, will leave it spinning overnight. > > No errors in ~36 hours (126 CPU-hrs), so that seems to work. Thanks. Actually... On killing the postmaster having completed this stress test, one of the backends was left running and didn't die on its own. It did die gracefully when I killed the backend or the client. I was able to repeat the result, on first try, but took numerous attempts to repeat the 2nd and 3rd time to save pg_stat_activity. Is there some issue regarding dsm_postmaster_shutdown ? [pryzbyj@database postgresql]$ ps -wwf --ppid 31656 UID PID PPID C STIME TTY TIME CMD pryzbyj 4512 31656 1 13:00 ? 00:00:00 postgres: pryzbyj postgres [local] EXPLAIN pryzbyj 31657 31656 0 12:59 ? 00:00:00 postgres: logger pryzbyj 31659 31656 0 12:59 ? 00:00:00 postgres: checkpointer pryzbyj 31662 31656 0 12:59 ? 00:00:00 postgres: stats collector pryzbyj 31785 31656 0 12:59 ? 00:00:00 postgres: pryzbyj postgres [local] idle datid | 13285 datname | postgres pid | 4512 usesysid | 10 usename | pryzbyj application_name | psql client_addr | client_hostname | client_port | -1 backend_start | 2019-02-17 13:00:50.79285-07 xact_start | 2019-02-17 13:00:50.797711-07 query_start | 2019-02-17 13:00:50.797711-07 state_change | 2019-02-17 13:00:50.797713-07 wait_event_type | IPC wait_event | ExecuteGather state | active backend_xid | backend_xmin | 1569 query | explain analyze SELECT colcld.child c, parent p, array_agg(colpar.attname::text ORDER BY colpar.attnum) cols, array_agg(format_type(colpar.atttypid, colpar.atttypmod) ORDER BY colpar.attnum) AS typ es FROM queued_alters qa JOIN pg_attribute colpar ON to_regclass(qa.parent)=colpar.attrelid AND colpar.attnum>0 AND NOT colpar.attisdropped JOIN (SELECT *, attrelid::regclass::text AS child FROM pg_attribute) colcld ON to_regclass(qa.child) =colcld.attrelid AND colcld.attnum>0 AND NOT colcld.attisdropped WHERE colcld.attname=colpar.attname AND colpar.atttypid!=colcld.atttypid GROUP BY 1,2 ORDER BY parent LIKE 'unused%', regexp_r eplace(colcld.child, '.*_((([0-9]{4}_[0-9]{2})_[0-9]{2})|(([0-9]{6})([0-9]{2})?))$', '\3\5') DESC, regexp_replace(colcld.child, '.*_', '') DESC LIMIT 1 backend_type | client backend #0 0x00007fe131637163 in __epoll_wait_nocancel () from /lib64/libc.so.6 #1 0x0000000000758d26 in WaitEventSetWaitBlock (nevents=1, occurred_events=0x7ffde16775a0, cur_timeout=-1, set=0x7fe132640e50) at latch.c:1048 #2 WaitEventSetWait (set=set@entry=0x7fe132640e50, timeout=timeout@entry=-1, occurred_events=occurred_events@entry=0x7ffde16775a0, nevents=nevents@entry=1, wait_event_info=wait_event_info@entry=134217731) at latch.c:1000 #3 0x00000000007591c2 in WaitLatchOrSocket (latch=0x7fe12a7591b4, wakeEvents=wakeEvents@entry=1, sock=sock@entry=-1, timeout=-1, timeout@entry=0, wait_event_info=wait_event_info@entry=134217731) at latch.c:385 #4 0x00000000007592a0 in WaitLatch (latch=, wakeEvents=wakeEvents@entry=1, timeout=timeout@entry=0, wait_event_info=wait_event_info@entry=134217731) at latch.c:339 #5 0x00000000006401e2 in gather_readnext (gatherstate=) at nodeGather.c:367 #6 gather_getnext (gatherstate=0x2af1f70) at nodeGather.c:256 #7 ExecGather (pstate=0x2af1f70) at nodeGather.c:207 #8 0x0000000000630188 in ExecProcNodeInstr (node=0x2af1f70) at execProcnode.c:461 #9 0x0000000000653506 in ExecProcNode (node=0x2af1f70) at ../../../src/include/executor/executor.h:247 #10 ExecSort (pstate=0x2af1e58) at nodeSort.c:107 #11 0x0000000000630188 in ExecProcNodeInstr (node=0x2af1e58) at execProcnode.c:461 #12 0x0000000000638a89 in ExecProcNode (node=0x2af1e58) at ../../../src/include/executor/executor.h:247 #13 fetch_input_tuple (aggstate=aggstate@entry=0x2af19e0) at nodeAgg.c:406 #14 0x000000000063a6b0 in agg_retrieve_direct (aggstate=0x2af19e0) at nodeAgg.c:1740 #15 ExecAgg (pstate=0x2af19e0) at nodeAgg.c:1555 #16 0x0000000000630188 in ExecProcNodeInstr (node=0x2af19e0) at execProcnode.c:461 #17 0x0000000000653506 in ExecProcNode (node=0x2af19e0) at ../../../src/include/executor/executor.h:247 #18 ExecSort (pstate=0x2af18c8) at nodeSort.c:107 #19 0x0000000000630188 in ExecProcNodeInstr (node=0x2af18c8) at execProcnode.c:461 #20 0x00000000006498e1 in ExecProcNode (node=0x2af18c8) at ../../../src/include/executor/executor.h:247 #21 ExecLimit (pstate=0x2af16b8) at nodeLimit.c:95 #22 0x0000000000630188 in ExecProcNodeInstr (node=0x2af16b8) at execProcnode.c:461 #23 0x0000000000628eda in ExecProcNode (node=0x2af16b8) at ../../../src/include/executor/executor.h:247 #24 ExecutePlan (execute_once=, dest=0xd96e60 , direction=, numberTuples=0, sendTuples=true, operation=CMD_SELECT, use_parallel_mode=, planstate=0x2af16b8, estate=0x2af1448) at execMain.c:1723 #25 standard_ExecutorRun (queryDesc=0x2b1eda0, direction=, count=0, execute_once=) at execMain.c:364 #26 0x00000000005c635f in ExplainOnePlan (plannedstmt=plannedstmt@entry=0x2b21c30, into=into@entry=0x0, es=es@entry=0x2ad1580, queryString=queryString@entry=0x29e7348 "explain analyze SELECT colcld.child c, parent p, array_agg(colpar.attname::text ORDER BY colpar.attnum) cols, array_agg(format_type(colpar.atttypid, colpar.atttypmod) ORDER BY colpar.attnum) AS types "..., params=params@entry=0x0, queryEnv=queryEnv@entry=0x0, planduration=planduration@entry=0x7ffde1677970) at explain.c:535 #27 0x00000000005c665f in ExplainOneQuery (query=, cursorOptions=, into=0x0, es=0x2ad1580, queryString=0x29e7348 "explain analyze SELECT colcld.child c, parent p, array_agg(colpar.attname::text ORDER BY colpar.attnum) cols, array_agg(format_type(colpar.atttypid, colpar.atttypmod) ORDER BY colpar.attnum) AS types "..., params=0x0, queryEnv=0x0) at explain.c:371 #28 0x00000000005c6bbe in ExplainQuery (pstate=pstate@entry=0x2a09bd8, stmt=stmt@entry=0x2aa0bb8, queryString=queryString@entry=0x29e7348 "explain analyze SELECT colcld.child c, parent p, array_agg(colpar.attname::text ORDER BY colpar.attnum) cols, array_agg(format_type(colpar.atttypid, colpar.atttypmod) ORDER BY colpar.attnum) AS types "..., params=params@entry=0x0, queryEnv=queryEnv@entry=0x0, dest=dest@entry=0x2a09b40) at explain.c:254 #29 0x0000000000782a1d in standard_ProcessUtility (pstmt=0x2aa0d40,