Обсуждение: pgsql: Remove the adminpack contrib extension

Поиск
Список
Период
Сортировка

pgsql: Remove the adminpack contrib extension

От
Daniel Gustafsson
Дата:
Remove the adminpack contrib extension

The adminpack extension was only used to support pgAdmin III,  which
in turn was declared EOL many years ago. Removing the extension also
allows us to remove functions from core as well which were only used
to support old version of adminpack.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Discussion: https://postgr.es/m/CALj2ACUmL5TraYBUBqDZBi1C+Re8_=SekqGYqYprj_W8wygQ8w@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cc09e6549f2bd2142b154d7d9802fb7a0abc643e

Modified Files
--------------
contrib/Makefile                          |   1 -
contrib/adminpack/.gitignore              |   4 -
contrib/adminpack/Makefile                |  24 --
contrib/adminpack/adminpack--1.0--1.1.sql |   6 -
contrib/adminpack/adminpack--1.0.sql      |  53 ---
contrib/adminpack/adminpack--1.1--2.0.sql |  51 ---
contrib/adminpack/adminpack--2.0--2.1.sql |  17 -
contrib/adminpack/adminpack.c             | 591 ------------------------------
contrib/adminpack/adminpack.control       |   6 -
contrib/adminpack/expected/adminpack.out  | 172 ---------
contrib/adminpack/meson.build             |  35 --
contrib/adminpack/sql/adminpack.sql       |  76 ----
contrib/meson.build                       |   1 -
doc/src/sgml/adminpack.sgml               | 159 --------
doc/src/sgml/contrib.sgml                 |   1 -
doc/src/sgml/filelist.sgml                |   1 -
src/backend/storage/ipc/signalfuncs.c     |  29 +-
src/backend/utils/adt/genfile.c           |  46 ---
src/include/catalog/catversion.h          |   2 +-
src/include/catalog/pg_proc.dat           |   7 -
20 files changed, 2 insertions(+), 1280 deletions(-)


Re: pgsql: Remove the adminpack contrib extension

От
Daniel Gustafsson
Дата:
> On 4 Mar 2024, at 12:43, Daniel Gustafsson <dgustafsson@postgresql.org> wrote:
>
> Remove the adminpack contrib extension

The pg_upgrade Xversion test on crake failed on this, I'm trying to reproduce
the cross-version test locally to verify the below diff but it's right now
failing on an unrelated thing.  If anyone has a working setup locally to test I
would love the below taken for a spin against something in 16->12.

diff --git a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
index c0da0aaff8..8dc1a65e3d 100644
--- a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
+++ b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
@@ -106,6 +106,16 @@ sub adjust_database_contents
             'drop extension if exists test_ext7');
     }

+    # we removed the adminpack extension in v17
+    if ($old_version >= 12 && $old_version < 17)
+    {
+        _add_st($result, 'regression',
+            'drop extension if exists adminpack');
+        _add_st($result, 'postgres',
+            'drop database contrib_regression_adminpack');
+        delete($dbnames{'contrib_regression_adminpack'});
+    }
+
     # we removed this test-support function in v17
     if ($old_version >= 15 && $old_version < 17)
     {

--
Daniel Gustafsson




Re: pgsql: Remove the adminpack contrib extension

От
Alvaro Herrera
Дата:
On 2024-Mar-04, Daniel Gustafsson wrote:

> The pg_upgrade Xversion test on crake failed on this, I'm trying to reproduce
> the cross-version test locally to verify the below diff but it's right now
> failing on an unrelated thing.

What unrelated thing?  I suggest to try to initdb the old version with
the current REL_12_STABLE branch tip, because IIRC there are changes
that cause the pg_upgrade test to fail.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
Y una voz del caos me habló y me dijo
"Sonríe y sé feliz, podría ser peor".
Y sonreí. Y fui feliz.
Y fue peor.



Re: pgsql: Remove the adminpack contrib extension

От
Daniel Gustafsson
Дата:
> On 4 Mar 2024, at 16:27, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> On 2024-Mar-04, Daniel Gustafsson wrote:
>
>> The pg_upgrade Xversion test on crake failed on this, I'm trying to reproduce
>> the cross-version test locally to verify the below diff but it's right now
>> failing on an unrelated thing.
>
> What unrelated thing?

I was trying to get the crossversion tests to work with make check, but was
only able to get them running properly with make installcheck, will investigate
that further.  So unrelated to the specific failure at hand, not unrelated to
crossversion testing.

> I suggest to try to initdb the old version with
> the current REL_12_STABLE branch tip, because IIRC there are changes
> that cause the pg_upgrade test to fail.

I see that my fix didn't solve it for 11 and 9.x on crake and drongo, will
rebuild more old trees and test to find the correct fix.

--
Daniel Gustafsson




Re: pgsql: Remove the adminpack contrib extension

От
Tom Lane
Дата:
Daniel Gustafsson <daniel@yesql.se> writes:
> I see that my fix didn't solve it for 11 and 9.x on crake and drongo, will
> rebuild more old trees and test to find the correct fix.

The oldest branches didn't make that DB, so you need an "IF EXISTS".
I pushed a fix after quickly checking it here.

            regards, tom lane



Re: pgsql: Remove the adminpack contrib extension

От
Daniel Gustafsson
Дата:
> On 4 Mar 2024, at 17:34, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Daniel Gustafsson <daniel@yesql.se> writes:
>> I see that my fix didn't solve it for 11 and 9.x on crake and drongo, will
>> rebuild more old trees and test to find the correct fix.
>
> The oldest branches didn't make that DB, so you need an "IF EXISTS".
> I pushed a fix after quickly checking it here.

Thanks for fixing, much appreciated!

The deviation between database names on crake found in the follow-up commit is
a bit concerning.  Too much magic hidden away from the codetree makes it hard
to get tests right on the first try.

--
Daniel Gustafsson




Re: pgsql: Remove the adminpack contrib extension

От
Tom Lane
Дата:
Daniel Gustafsson <daniel@yesql.se> writes:
> The deviation between database names on crake found in the follow-up commit is
> a bit concerning.  Too much magic hidden away from the codetree makes it hard
> to get tests right on the first try.

Yeah, I didn't understand that at all.  I have a non-reporting
buildfarm setup here that I run when it's necessary to debug these
cross-version tests, and it did not show this failure.  crake itself
was passing with the pre-16 branches, so I'm mystified why 16 is
different.  Anyway, I see it's green now, so all good.

            regards, tom lane