pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jonathan S. Katz <jkatz@postgresql.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18240: Undefined behaviour in cash_mul_flt8() and friends
Date: Fri, 12 Jan 2024 22:50:25 -0500
Message-ID: <e52ef545-5ec4-410f-83b8-8078e4fd4655@postgresql.org> (raw)
In-Reply-To: <484395.1705077198@sss.pgh.pa.us>
References: <ZXgh74Ykj3iWvXKr@paquier.xyz>
	<CAApHDvrBLa=gQ0tCg8727RaZXWDg1sDvFJ2+-DVy5SC=NSSKkg@mail.gmail.com>
	<2433182.1702391878@sss.pgh.pa.us>
	<ZX1rmhppwgaczYQ7@paquier.xyz>
	<3453263.1702739958@sss.pgh.pa.us>
	<ecdf4a19-e97d-42c8-be45-fb5a46166160@postgresql.org>
	<1673413.1703442075@sss.pgh.pa.us>
	<ZYjSZZu1UGUlXWXa@paquier.xyz>
	<ZYlSJREbhM_qNZIT@paquier.xyz>
	<1851211.1703519939@sss.pgh.pa.us>
	<ZZ9AdxEEwHD8CWJ5@paquier.xyz>
	<9115f2e8-8dde-4545-868c-9becb2260aef@postgresql.org>
	<484395.1705077198@sss.pgh.pa.us>

On 1/12/24 11:33 AM, Tom Lane wrote:
> "Jonathan S. Katz" <jkatz@postgresql.org> writes:

>> It sounds like we'd have to tread a bit lightly because of this, even if
>> money is not frequently (or at all) used with btree_gist/gin?
> 
> What'd have to happen is that people would have to upgrade to a
> version of btree_gin/btree_gist that deletes its money support
> before they could pg_upgrade into a core version that lacks money.
> So we'd have to ship that version at least one major release before
> nuking the core support.

Hm -- what about people who skip versions (e.g. 16 => 19)? Would they 
have to stop at 18 first to perform the upgrade? And does this only 
affect people who use btree_gist/gin for moeny, or all btree_gist/gin users?

> I think the shortest timeline we could possibly do this on is:
> 
> v17: label money as deprecated and due for removal in the SGML docs

We had apparently deprecation notice as late as 8.2[1], but this warning 
is missing in the docs :(

> v18: remove support in btree_gin/btree_gist (and any other affected
> extensions)

If the btree_gist/gin issue only affects people who use it in 
combination with money, I'd at least think we consider this for v17, and 
make clear that a users with money have to take action before upgrading.

If we stick with just adding the deprecation notice in the v17 docs, I'd 
also suggest we emit a log warning when loading the catalog if the user 
has an active use of a "money" type in a table. (I understand that may a 
pain to do, but at least wanted to suggested it).

> v19: remove it from core
> 
> Note that in v18, people could still use money even in
> btree_gin/btree_gist, just by installing a non-default extension
> version.  So their C code for money would have to stay.

Yeah, but for what we support directly in PostgreSQL, we will have made 
best effort. If someone _really_ wants to do something with "money" in 
the way you describe above, then they're committed to it.

Thanks,

Jonathan

[1] https://www.postgresql.org/docs/8.2/datatype-money.html



Attachments:

  OpenPGP_signature.asc (application/pgp-signature, 839B) download

view thread (24+ messages)  latest in thread

Message-ID: <e52ef545-5ec4-410f-83b8-8078e4fd4655@postgresql.org>
Permalink:  ../e52ef545-5ec4-410f-83b8-8078e4fd4655@postgresql.org/
Also on:    postgresql.org/message-id/e52ef545-5ec4-410f-83b8-8078e4fd4655@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: jkatz@postgresql.org, tgl@sss.pgh.pa.us, michael@paquier.xyz, dgrowleyml@gmail.com, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18240: Undefined behaviour in cash_mul_flt8() and friends
  In-Reply-To: <e52ef545-5ec4-410f-83b8-8078e4fd4655@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox