Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1etXTJ-0001Dw-Bh for pgsql-bugs@arkaria.postgresql.org; Wed, 07 Mar 2018 11:43:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1etXTH-0006DN-Nj for pgsql-bugs@arkaria.postgresql.org; Wed, 07 Mar 2018 11:42:59 +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 1etXTH-0006DE-De for pgsql-bugs@lists.postgresql.org; Wed, 07 Mar 2018 11:42:59 +0000 Received: from forward106p.mail.yandex.net ([2a02:6b8:0:1472:2741:0:8b7:109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1etXTE-0005tR-32 for pgsql-bugs@lists.postgresql.org; Wed, 07 Mar 2018 11:42:58 +0000 Received: from mxback18j.mail.yandex.net (mxback18j.mail.yandex.net [IPv6:2a02:6b8:0:1619::94]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 4C1B42D826DD; Wed, 7 Mar 2018 14:42:52 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback18j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id yCqRneL9At-gpV0YZF7; Wed, 07 Mar 2018 14:42:51 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zsrv.org; s=mail; t=1520422971; bh=D4wNM3F3t/z+UTp185wfn4HRK5IEutTYpAqgFlOhkJA=; h=From:To:In-Reply-To:References:Subject:Message-Id:Date; b=dvxJ9SZd7ESsSxzAuG+i2Ri/bwTa8PQr8gIDUzx6nbcHdrwZW8yhcThQjH9jNONIB aihlExMt0VgTYUVu7aDYmIQepnvlUWfiE0xJ7jLFpq6auG0jG4t/3KSUG+xcSqFgOL KIIAM619bWOp2r2xdu0RyysvrZCLZoZaiY5BD+lg= Authentication-Results: mxback18j.mail.yandex.net; dkim=pass header.i=@zsrv.org Received: by web24j.yandex.ru with HTTP; Wed, 07 Mar 2018 14:42:51 +0300 From: Sergei Kornilov To: "kassai1972@gmail.com" , "pgsql-bugs@lists.postgresql.org" In-Reply-To: <152042217039.23129.15033816705467560566@wrigleys.postgresql.org> References: <152042217039.23129.15033816705467560566@wrigleys.postgresql.org> Subject: Re: BUG #15100: sequence behavior on failed insert to a partitioned table MIME-Version: 1.0 Message-Id: <428781520422971@web24j.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Wed, 07 Mar 2018 14:42:51 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/html; charset=utf-8 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk
Hello
This is not bug. Sequences are never rollback by design.
 
https://www.postgresql.org/docs/current/static/sql-createsequence.html
> Because nextval and setval calls are never rolled back, sequence objects cannot be used if “gapless” assignment of sequence numbers is needed.
 
regards, Sergei