goharbor / harbor

An open source trusted cloud native registry project that stores, signs, and scans content.
https://goharbor.io
Apache License 2.0
23.06k stars 4.65k forks source link

Database 2.9 or newer is missing contrib package #20027

Closed xhejtman closed 1 month ago

xhejtman commented 4 months ago

Is your feature request related to a problem? Please describe. Database image 2.8. contained some extensions, e.g., unaccent. This extension is moved to the contrib package of the database that is not installed in 2.9 or newer version.

Describe the solution you'd like Install postgresql-contrib package into db image.

Describe the main design/architecture of your solution We use unaccent function in db trigger funcion to create default per user repo.

wy65701436 commented 4 months ago

we do only install the pg binary by tdnf that maintained by base OS(photon), didn't change in v2.9.

How can I validate your question?

xhejtman commented 4 months ago

This is db image version 2.8.4:

ls -1 /usr/pgsql/13/lib/postgresql
_int.so
adminpack.so
amcheck.so
auth_delay.so
auto_explain.so
autoinc.so
bloom.so
btree_gin.so
btree_gist.so
citext.so
cube.so
cyrillic_and_mic.so
dblink.so
dict_int.so
dict_snowball.so
dict_xsyn.so
earthdistance.so
euc2004_sjis2004.so
euc_cn_and_mic.so
euc_jp_and_sjis.so
euc_kr_and_mic.so
euc_tw_and_big5.so
file_fdw.so
fuzzystrmatch.so
hstore.so
insert_username.so
isn.so
latin2_and_win1250.so
latin_and_mic.so
libecpg.a
libecpg.so
libecpg.so.6
libecpg.so.6.13
libecpg_compat.a
libecpg_compat.so
libecpg_compat.so.3
libecpg_compat.so.3.13
libpgcommon.a
libpgcommon_shlib.a
libpgfeutils.a
libpgport.a
libpgport_shlib.a
libpgtypes.a
libpgtypes.so
libpgtypes.so.3
libpgtypes.so.3.13
libpq.a
libpq.so
libpq.so.5
libpq.so.5.13
libpqwalreceiver.so
lo.so
ltree.so
moddatetime.so
pageinspect.so
passwordcheck.so
pg_buffercache.so
pg_freespacemap.so
pg_prewarm.so
pg_stat_statements.so
pg_trgm.so
pg_visibility.so
pgcrypto.so
pgoutput.so
pgrowlocks.so
pgstattuple.so
pgxml.so
pgxs
pkgconfig
plpgsql.so
postgres_fdw.so
refint.so
seg.so
sslinfo.so
tablefunc.so
tcn.so
test_decoding.so
tsm_system_rows.so
tsm_system_time.so
unaccent.so
utf8_and_big5.so
utf8_and_cyrillic.so
utf8_and_euc2004.so
utf8_and_euc_cn.so
utf8_and_euc_jp.so
utf8_and_euc_kr.so
utf8_and_euc_tw.so
utf8_and_gb18030.so
utf8_and_gbk.so
utf8_and_iso8859.so
utf8_and_iso8859_1.so
utf8_and_johab.so
utf8_and_sjis.so
utf8_and_sjis2004.so
utf8_and_uhc.so
utf8_and_win.so
uuid-ossp.so

and this is 2.9.0:

ls -1 /usr/pgsql/13/lib/postgresql
cyrillic_and_mic.so
dict_int.so
dict_snowball.so
dict_xsyn.so
euc2004_sjis2004.so
euc_cn_and_mic.so
euc_jp_and_sjis.so
euc_kr_and_mic.so
euc_tw_and_big5.so
latin2_and_win1250.so
latin_and_mic.so
libecpg.so
libecpg.so.6
libecpg.so.6.13
libecpg_compat.so.3
libecpg_compat.so.3.13
libpgtypes.so.3
libpgtypes.so.3.13
libpq.so.5
libpq.so.5.13
libpqwalreceiver.so
pgoutput.so
plpgsql.so
utf8_and_big5.so
utf8_and_cyrillic.so
utf8_and_euc2004.so
utf8_and_euc_cn.so
utf8_and_euc_jp.so
utf8_and_euc_kr.so
utf8_and_euc_tw.so
utf8_and_gb18030.so
utf8_and_gbk.so
utf8_and_iso8859.so
utf8_and_iso8859_1.so
utf8_and_johab.so
utf8_and_sjis.so
utf8_and_sjis2004.so
utf8_and_uhc.so
utf8_and_win.so

most extensions were removed from the based package in photon 4 -> 5 transition.

wy65701436 commented 4 months ago

You may need to discuss this with the Photon team, as the process involves installing the PG by version using tdnf from the Harbor side.

xhejtman commented 4 months ago

Well, the only thing you would need is to install also the postgres-contrib package into the db container.

github-actions[bot] commented 2 months ago

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

github-actions[bot] commented 1 month ago

This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue.