pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Retiring support for pre-7.3 FK constraint triggers
Date: Thu, 05 Mar 2020 10:33:09 -0500
Message-ID: <3685.1583422389@sss.pgh.pa.us> (raw)
In-Reply-To: <B3B93FAD-5B8C-4594-A33B-CAE504520530@yesql.se>
References: <20200305143041.GA7031@alvherre.pgsql>
	<1154.1583419325@sss.pgh.pa.us>
	<B3B93FAD-5B8C-4594-A33B-CAE504520530@yesql.se>

Daniel Gustafsson <daniel@yesql.se> writes:
> On 5 Mar 2020, at 15:42, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> +1 --- I think this fits in well with my nearby proposal to remove
>> OPAQUE, which is also only relevant for pre-7.3 dumps.  Let's just
>> nuke that stuff.

> Sounds good. I was opting for 14 to not violate the no new patches in an ongoing CF policy, but if there is concensus from committers then +1 from me.

As long as we're thinking of zapping code that is long past its sell-by
date, I propose getting rid of this stanza in indexcmds.c, which
basically causes CREATE INDEX to ignore certain opclass specifications:

    /*
     * Release 7.0 removed network_ops, timespan_ops, and datetime_ops, so we
     * ignore those opclass names so the default *_ops is used.  This can be
     * removed in some later release.  bjm 2000/02/07
     *
     * Release 7.1 removes lztext_ops, so suppress that too for a while.  tgl
     * 2000/07/30
     *
     * Release 7.2 renames timestamp_ops to timestamptz_ops, so suppress that
     * too for awhile.  I'm starting to think we need a better approach. tgl
     * 2000/10/01
     *
     * Release 8.0 removes bigbox_ops (which was dead code for a long while
     * anyway).  tgl 2003/11/11
     */
    if (list_length(opclass) == 1)
    {
        char       *claname = strVal(linitial(opclass));

        if (strcmp(claname, "network_ops") == 0 ||
            strcmp(claname, "timespan_ops") == 0 ||
            strcmp(claname, "datetime_ops") == 0 ||
            strcmp(claname, "lztext_ops") == 0 ||
            strcmp(claname, "timestamp_ops") == 0 ||
            strcmp(claname, "bigbox_ops") == 0)
            opclass = NIL;
    }


At some point, the risk that this causes problems for developers of
new opclasses must outweigh the value of silently upgrading old dumps.
I think if we're zapping other pre-7.3-compatibility hacks for that
purpose, this one could go too.

Elsewhere in indexcmds.c, there's this:

        /*
         * Hack to provide more-or-less-transparent updating of old RTREE
         * indexes to GiST: if RTREE is requested and not found, use GIST.
         */
        if (strcmp(accessMethodName, "rtree") == 0)
        {
            ereport(NOTICE,
                    (errmsg("substituting access method \"gist\" for obsolete method \"rtree\"")));
            accessMethodName = "gist";
            tuple = SearchSysCache1(AMNAME, PointerGetDatum(accessMethodName));
        }

which dates to 8.2 (2a8d3d83e of 2005-11-07).  This is less bad than the
other thing, since it won't affect the behavior of any command that
wouldn't otherwise just fail; but maybe its time has passed as well?
Although Alvaro's point comparing these behaviors to pg_dump's support
cutoff of 8.0 suggests that maybe we should leave this one for now.

			regards, tom lane





view thread (13+ messages)  latest in thread

Message-ID: <3685.1583422389@sss.pgh.pa.us>
Permalink:  ../3685.1583422389@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3685.1583422389@sss.pgh.pa.us

 · 

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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, daniel@yesql.se, alvherre@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Retiring support for pre-7.3 FK constraint triggers
  In-Reply-To: <3685.1583422389@sss.pgh.pa.us>

* 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