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 1fui1M-00048T-In for pgsql-docs@arkaria.postgresql.org; Tue, 28 Aug 2018 17:43:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fui1K-0006Ii-2z for pgsql-docs@arkaria.postgresql.org; Tue, 28 Aug 2018 17:43:14 +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 1fui1J-0006Ib-TP for pgsql-docs@lists.postgresql.org; Tue, 28 Aug 2018 17:43:13 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fui1G-0000Zv-Rt for pgsql-docs@postgresql.org; Tue, 28 Aug 2018 17:43:13 +0000 Received: from [144.121.72.194] (helo=[172.16.7.107]) by meldrar.postgresql.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fui1C-0007YI-PE; Tue, 28 Aug 2018 17:43:09 +0000 From: "Jonathan S. Katz" Message-Id: <44766755-EB1A-4FB7-8B3C-10BCC25AC624@postgresql.org> Content-Type: multipart/signed; boundary="Apple-Mail=_933E1922-4EAA-44CB-A8AE-500BD78FCA92"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: retroactive pg10 relnotes: sequence changes Date: Tue, 28 Aug 2018 13:43:03 -0400 In-Reply-To: <006E0E48-7E9C-4C34-9BCA-C51C2076E3B9@postgresql.org> Cc: Alvaro Herrera , Pg Docs , Bruce Momjian To: Magnus Hagander References: <20180828163408.vl44nwetdybwffyk@alvherre.pgsql> <006E0E48-7E9C-4C34-9BCA-C51C2076E3B9@postgresql.org> X-Mailer: Apple Mail (2.3273) X-Host-Lookup-Failed: Reverse DNS lookup failed for 144.121.72.194 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_933E1922-4EAA-44CB-A8AE-500BD78FCA92 Content-Type: multipart/alternative; boundary="Apple-Mail=_C6455CE8-30B3-4F85-A749-2B1660637FC2" --Apple-Mail=_C6455CE8-30B3-4F85-A749-2B1660637FC2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Aug 28, 2018, at 1:09 PM, Jonathan S. Katz = wrote: >=20 >=20 >> On Aug 28, 2018, at 1:02 PM, Magnus Hagander > wrote: >>=20 >>=20 >>=20 >> On Tue, Aug 28, 2018 at 6:34 PM, Alvaro Herrera = > wrote: >> Hello >>=20 >> A customer of ours was taken by surprise by a change in Postgres 10 = on a >> trial upgrade from 9.6. They were using sequences from SERIAL = columns a >> little unorthodoxly, and their stuff stopped working: essentially, = they >> hacked the default expression so that it'd automatically use negative >> numbers when the sequence reached INT_MAX. Since pg10 changed = sequences >> to stop emitting values at that point, it raised an error rather than >> emit the negative numbers. >>=20 >> (In 9.6 and prior, the sequence would emit values past INT_MAX; it = was >> the column that raised the error. In pg10 things were changed so = that >> it is now the sequence that raises the error.) >>=20 >> My proposal now is to document this issue in the Postgres 10 release >> notes. "It's a little late for that!" I hear you say, but keep this = in >> mind: many users have *not* yet upgraded to 10, and they'll keep = doing >> it for years to come still. So I disagree that now is too late. We >> failed to warn people that already upgraded, but we're still on time = to >> alert people yet to upgrade. >>=20 >> I attach both the patch and a screenshot to show how minor the visual >> effect of the change is. >>=20 >> (If people hate this, another option is to make it a separate bullet >> point.) >>=20 >> Looks reasonable to me. And I definitely think we should do it -- = people will be upgrading to 10 for years to come, so claiming it's too = late is definitely not correct. >=20 > +1. >=20 > I have attached patch where I suggested some alternate wording and > remove the parenthetical comment, as I don=E2=80=99t believe that = should be > an aside. Per off-list discussion from Bruce, re-attaching the patch. Apparently it was only available in HTML mimepart. Hopefully this gets it into the archives. Jonathan --Apple-Mail=_C6455CE8-30B3-4F85-A749-2B1660637FC2 Content-Type: multipart/mixed; boundary="Apple-Mail=_634D330A-A24D-4A02-935A-5777863DC39D" --Apple-Mail=_634D330A-A24D-4A02-935A-5777863DC39D Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
On Aug 28, 2018, at 1:09 PM, Jonathan S. Katz <jkatz@postgresql.org> wrote:


On Aug 28, 2018, at 1:02 PM, Magnus Hagander <magnus@hagander.net>= wrote:



On Tue, Aug 28, 2018 at 6:34 PM, Alvaro = Herrera <alvherre@2ndquadrant.com> wrote:
Hello

A customer of ours was taken by surprise by a = change in Postgres 10 on a
trial upgrade from 9.6.  = They were using sequences from SERIAL columns a
little = unorthodoxly, and their stuff stopped working: essentially, they
hacked the default expression so that it'd automatically use = negative
numbers when the sequence reached INT_MAX.  = Since pg10 changed sequences
to stop emitting values at = that point, it raised an error rather than
emit the = negative numbers.

(In 9.6 and prior, the = sequence would emit values past INT_MAX; it was
the column = that raised the error.  In pg10 things were changed so that
it is now the sequence that raises the error.)

My proposal now is to document this issue in = the Postgres 10 release
notes.  "It's a little late = for that!" I hear you say, but keep this in
mind: many = users have *not* yet upgraded to 10, and they'll keep doing
it for years to come still.  So I disagree that now is = too late.  We
failed to warn people that already = upgraded, but we're still on time to
alert people yet to = upgrade.

I attach both the patch and a = screenshot to show how minor the visual
effect of the = change is.

(If people hate this, another = option is to make it a separate bullet
point.)

Looks reasonable to me. And I definitely think we should do = it -- people will be upgrading to 10 for years to come, so claiming it's = too late is definitely not = correct. 

+1.

I= have attached patch where I suggested some alternate wording = and
remove the parenthetical comment, as I don=E2=80=99= t believe that should be
an = aside.

Per = off-list discussion from Bruce, re-attaching the patch. = Apparently
it was only available in HTML mimepart. Hopefully = this gets it into
the archives.

Jonathan


= --Apple-Mail=_634D330A-A24D-4A02-935A-5777863DC39D Content-Disposition: attachment; filename=sequences-10-v2.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="sequences-10-v2.patch" Content-Transfer-Encoding: 7bit diff --git a/doc/src/sgml/release-10.sgml b/doc/src/sgml/release-10.sgml index f1b0f2e0bf..09e5d0c593 100644 --- a/doc/src/sgml/release-10.sgml +++ b/doc/src/sgml/release-10.sgml @@ -4716,6 +4716,13 @@ Branch: REL_10_STABLE [5159626af] 2017-11-03 14:14:16 -0400 more compatible with existing code. + + Also, sequences created for SERIAL columns now generate + positive 32-bit wide values, whereas previous versions generated 64-bit + wide values. This has no visible effect if the values are only stored in + a column. + + The output of psql's \d command for a sequence has been redesigned, too. --Apple-Mail=_634D330A-A24D-4A02-935A-5777863DC39D Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii --Apple-Mail=_634D330A-A24D-4A02-935A-5777863DC39D-- --Apple-Mail=_C6455CE8-30B3-4F85-A749-2B1660637FC2-- --Apple-Mail=_933E1922-4EAA-44CB-A8AE-500BD78FCA92 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE+oS2la8r95ogZD/x8QSccp8cZScFAluFiacACgkQ8QSccp8c ZSe5yQ/9GFClrNsr7cDA/GKr4bMhM4h6S8+oJqELb/qMWpIP0RhrRg8ITzQaTVAE ggznMLsKzoo+QinPjvKbUyfj43I8YmONxos6oVQ8g3E6j5cu4XYplswq1Gc+3zDI zRU9MkFeXC2ng8y5IELcIqST/VEkMM2oiXa6nCVb8Ds5twlQb1YgRmR+3Mg6ajcO hljr+bm6iM46t/QMwoOJm2jU8Hcuo3kkVGHbKsU6U5iNpvgBm/Fp4GI2AUrj39HG zq6PX7TWefXB3bmxpR/b6TTjDO4WyXTH/MP7h0ioGdgpYZsoDTmN5zWDLbc7e96c umGrr9N6gu/qvEGi+C3ID7ulO5/wFjxASFFna2VzPpMuWHQiTul5Ym7a6v7HjzSf 1v8utHQSAoToAx+3NxUNWtrlLF8nrsXLpp5P+OVGZboXEcJJ2njn6w/dcipF/wDh 0AHVupROO69Dj/gJR02q8O5bnxoJgMeeI3gAoAWPZ54Fzy0Gc3zUVdeG0VgEv7p+ wpyX4m3JfPfhPMaCi5HHLSJIeIkdUceFoB8SgRn8cVMyhxFA3vcauDBl4rB3yPxx IEu95lwMC5ltwyJWqL1gH8zP/IAQlCo1QHk247+vDi/2TQPgqTMAkRzMLiRzhUYD ktk58qA8c7G39w66kkQtPYORw9YdTo+dY5VBfQ9RyVqnXC1RqTA= =2kMb -----END PGP SIGNATURE----- --Apple-Mail=_933E1922-4EAA-44CB-A8AE-500BD78FCA92--