Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frvL4-0002y6-BR for pgsql-bugs@arkaria.postgresql.org; Tue, 21 Aug 2018 01:20:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1frvL0-0004Ne-Jj for pgsql-bugs@arkaria.postgresql.org; Tue, 21 Aug 2018 01:20:02 +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.89) (envelope-from ) id 1frvL0-0004NV-Dg for pgsql-bugs@lists.postgresql.org; Tue, 21 Aug 2018 01:20:02 +0000 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1frvKs-0005pl-F7 for pgsql-bugs@lists.postgresql.org; Tue, 21 Aug 2018 01:20:01 +0000 Received: by mail-qk0-x242.google.com with SMTP id d131-v6so2212331qke.11 for ; Mon, 20 Aug 2018 18:19: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:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=MR2RWGFPsfj8i6oHpO4i1yMYZWM8CqoXIgoWRjG3wfE=; b=wxxgO4+byVcUAZWgyWULV+1ryfszoIFMag0ZCeXHB8t8Yi1BRAdu5tewqJHBIlILSl W0Zh4IRd5EPX5tSECvThiVmosk54fkkyyNJhrv3yA5jpykjVSoGlXqVTAfK2yLy/xG6h UBQ+0I/yfZkDuPx/n1TPjNdLsXomPVvyl6Pdyek0U1JmeqIr0RR48IC+/jjzYhZ5uWo5 ZRNoEE3BjvPxjDWGqtteJ6rl/iPjU68msJaKS9/Jp8UQR/o2na5wQPnZOvSMZ2w7hfl5 1OuWDZv+5yAkmOzPlZ77XC0qrUR7FLLtaxJHtF/WrkS6iuPUjVnFI7Uh8/evHPtyolBy dP6Q== 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:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=MR2RWGFPsfj8i6oHpO4i1yMYZWM8CqoXIgoWRjG3wfE=; b=aR72HBJW51gS3aoFK11X5//PGSQ4XX3hRonLjb/FtZw4NCPID1U+iMZwgpUbcp8ngo fIwT7yUkAvzl6YKlBmowyjnIUjxu8fDmHXb1uLqPyT4se1AgcYSnwVdXTtGJxNVSyn6R Xm4nSN1poIJiNUoZ/D/wp0KfJjxvC/o35IdP3LietVmqTbUwGpgaEBTz3C88QmDA2tMX 4fYig63H2H/LcbmESMqVsfU1NACH+IPICK4dtxJgXwALEHhTCCQy08nNgcACHYP8Drns 5SzzPodILJBfTs4k80sNL2aXuKRt9L0/criHYJlxCbWf9D2RLIv5hYoph6h3VWMwjLs0 4rxg== X-Gm-Message-State: AOUpUlEicoHXy0TWVmfl/omUEuwjiJHWFU6Q6UtQY/5DJ0YAOlf8yqto g2S+7m1L3tHfCjUSFnJFUzuPGA== X-Google-Smtp-Source: AA+uWPxMv6H91MBKIy98442GDxzIraDa0XoNpeEHAuvO0vY4a9Ra8MqP61I1DGvRpjcSdFm9XL6H6g== X-Received: by 2002:a37:254a:: with SMTP id x71-v6mr44248040qkg.350.1534814391989; Mon, 20 Aug 2018 18:19:51 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([201.186.81.181]) by smtp.gmail.com with ESMTPSA id x23-v6sm6121987qto.52.2018.08.20.18.19.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Aug 2018 18:19:51 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id D96B3379; Mon, 20 Aug 2018 22:19:49 -0300 (-03) Date: Mon, 20 Aug 2018 22:19:49 -0300 From: Alvaro Herrera To: David Rowley Cc: abelisto@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15343: Segmentation fault using pg_dump with --exclude-table if table contains identity column Message-ID: <20180821011949.r5ogh32qluf56na6@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Aug-21, David Rowley wrote: > > To reproduce: > > $ createdb foo > > $ psql foo -c "create table bar(i int generated by default as identity > > primary key);" > > $ pg_dump foo --exclude-table=bar > > Segmentation fault (core dumped) > I think the fix depends exactly on what we want the behaviour to be > here. Should dumpSequence() still dump out a CREATE SEQUENCE > statement for this, or should we just ignore the sequence? I imagine > we should just ignore identity sequences when we're not going to dump > the table that owns them. It looks like that would require a small > modification in getOwnedSeqs(). Yeah, we should omit the sequence too. I don't see any principled reason to think that the sequence is interesting on its own. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services