public inbox for [email protected]help / color / mirror / Atom feed
retroactive pg10 relnotes: sequence changes 6+ messages / 4 participants [nested] [flat]
* retroactive pg10 relnotes: sequence changes @ 2018-08-28 16:34 Alvaro Herrera <[email protected]> 0 siblings, 1 reply; 6+ messages in thread From: Alvaro Herrera @ 2018-08-28 16:34 UTC (permalink / raw) To: pgsql-docs 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.) -- Álvaro Herrera diff --git a/doc/src/sgml/release-10.sgml b/doc/src/sgml/release-10.sgml index 968ed866c2..f1dc816278 100644 --- a/doc/src/sgml/release-10.sgml +++ b/doc/src/sgml/release-10.sgml @@ -4717,6 +4717,13 @@ Branch: REL_10_STABLE [5159626af] 2017-11-03 14:14:16 -0400 </para> <para> + Also, sequences created for <literal>SERIAL</literal> columns now + generate positive 32-bit wide values rather than 64-bit, as they + used to. (This has no visible effect if the values are just stored in + the column.) + </para> + + <para> The output of <application>psql</application>'s <command>\d</command> command for a sequence has been redesigned, too. </para> Attachments: [text/plain] sequences-10.patch (710B, 2-sequences-10.patch) download | inline diff: diff --git a/doc/src/sgml/release-10.sgml b/doc/src/sgml/release-10.sgml index 968ed866c2..f1dc816278 100644 --- a/doc/src/sgml/release-10.sgml +++ b/doc/src/sgml/release-10.sgml @@ -4717,6 +4717,13 @@ Branch: REL_10_STABLE [5159626af] 2017-11-03 14:14:16 -0400 </para> <para> + Also, sequences created for <literal>SERIAL</literal> columns now + generate positive 32-bit wide values rather than 64-bit, as they + used to. (This has no visible effect if the values are just stored in + the column.) + </para> + + <para> The output of <application>psql</application>'s <command>\d</command> command for a sequence has been redesigned, too. </para> [image/png] sequences.png (64.5K, 3-sequences.png) download | view image ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: retroactive pg10 relnotes: sequence changes @ 2018-08-28 17:02 Magnus Hagander <[email protected]> parent: Alvaro Herrera <[email protected]> 0 siblings, 2 replies; 6+ messages in thread From: Magnus Hagander @ 2018-08-28 17:02 UTC (permalink / raw) To: Alvaro Herrera <[email protected]>; +Cc: pgsql-docs On Tue, Aug 28, 2018 at 6:34 PM, Alvaro Herrera <[email protected]> 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. -- Magnus Hagander Me: https://www.hagander.net/ <http://www.hagander.net/; Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/; ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: retroactive pg10 relnotes: sequence changes @ 2018-08-28 17:09 Jonathan S. Katz <[email protected]> parent: Magnus Hagander <[email protected]> 1 sibling, 2 replies; 6+ messages in thread From: Jonathan S. Katz @ 2018-08-28 17:09 UTC (permalink / raw) To: Magnus Hagander <[email protected]>; +Cc: Alvaro Herrera <[email protected]>; pgsql-docs > On Aug 28, 2018, at 1:02 PM, Magnus Hagander <[email protected]> wrote: > > > > On Tue, Aug 28, 2018 at 6:34 PM, Alvaro Herrera <[email protected] <mailto:[email protected]>> 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’t believe that should be an aside. Jonathan Attachments: [application/octet-stream] sequences-10.patch (755B, 3-sequences-10.patch) download | inline diff: 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. </para> + <para> + Also, sequences created for <literal>SERIAL</literal> 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. + </para> + <para> The output of <application>psql</application>'s <command>\d</command> command for a sequence has been redesigned, too. [application/pgp-signature] signature.asc (833B, 5-signature.asc) download ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: retroactive pg10 relnotes: sequence changes @ 2018-08-28 17:43 Jonathan S. Katz <[email protected]> parent: Jonathan S. Katz <[email protected]> 1 sibling, 0 replies; 6+ messages in thread From: Jonathan S. Katz @ 2018-08-28 17:43 UTC (permalink / raw) To: Magnus Hagander <[email protected]>; +Cc: Alvaro Herrera <[email protected]>; pgsql-docs; Bruce Momjian <[email protected]> > On Aug 28, 2018, at 1:09 PM, Jonathan S. Katz <[email protected]> wrote: > > >> On Aug 28, 2018, at 1:02 PM, Magnus Hagander <[email protected] <mailto:[email protected]>> wrote: >> >> >> >> On Tue, Aug 28, 2018 at 6:34 PM, Alvaro Herrera <[email protected] <mailto:[email protected]>> 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’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 Attachments: [application/octet-stream] sequences-10-v2.patch (755B, 3-sequences-10-v2.patch) download | inline diff: 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. </para> + <para> + Also, sequences created for <literal>SERIAL</literal> 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. + </para> + <para> The output of <application>psql</application>'s <command>\d</command> command for a sequence has been redesigned, too. [application/pgp-signature] signature.asc (833B, 5-signature.asc) download ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: retroactive pg10 relnotes: sequence changes @ 2018-08-29 01:13 Andres Freund <[email protected]> parent: Magnus Hagander <[email protected]> 1 sibling, 0 replies; 6+ messages in thread From: Andres Freund @ 2018-08-29 01:13 UTC (permalink / raw) To: Magnus Hagander <[email protected]>; +Cc: Alvaro Herrera <[email protected]>; pgsql-docs On 2018-08-28 19:02:06 +0200, Magnus Hagander wrote: > 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. Please make sure to backpatch it to all branches carrying v10 release notes... Greetings, Andres Freund ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: retroactive pg10 relnotes: sequence changes @ 2018-08-30 08:44 Alvaro Herrera <[email protected]> parent: Jonathan S. Katz <[email protected]> 1 sibling, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2018-08-30 08:44 UTC (permalink / raw) To: Jonathan S. Katz <[email protected]>; +Cc: Magnus Hagander <[email protected]>; pgsql-docs On 2018-Aug-28, Jonathan S. Katz wrote: > I have attached patch where I suggested some alternate wording and > remove the parenthetical comment, as I don’t believe that should be > an aside. Cool, thanks. I have pushed it with your proposed wording. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2018-08-30 08:44 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-08-28 16:34 retroactive pg10 relnotes: sequence changes Alvaro Herrera <[email protected]> 2018-08-28 17:02 ` Magnus Hagander <[email protected]> 2018-08-28 17:09 ` Jonathan S. Katz <[email protected]> 2018-08-28 17:43 ` Jonathan S. Katz <[email protected]> 2018-08-30 08:44 ` Alvaro Herrera <[email protected]> 2018-08-29 01:13 ` Andres Freund <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox