Vonng / pigsty

Free RDS for PostgreSQL —— Pigsty
https://pigsty.io
GNU Affero General Public License v3.0
3.58k stars 266 forks source link

An error occurred when I installed extensions on a PostgreSQL cluster that had already been provisioned and initialized. #469

Closed Shercode closed 19 hours ago

Shercode commented 3 days ago

lly@pg-meta-1:~/pigsty$ ./pgsql.yml -t pg_extension

PLAY [PGSQL] **

TASK [node_id : get node fact] **** changed: [192.168.1.125]

TASK [node_id : set node fact] **** ok: [192.168.1.125]

TASK [node_id : fill empty nodename with hostname] **** skipping: [192.168.1.125]

TASK [node_id : build node identity] ** ok: [192.168.1.125]

TASK [node_id : load debian.12 x86_64 vars] *** ok: [192.168.1.125]

TASK [node_id : print node identity] ** ok: [192.168.1.125] => { "msg": "nodename: pg-meta-1, node_cluster: pg-meta, spec: c4m4, os: debian.12.x86_64 d12:deb, [ADMIN] [INFRA] [PGSQL: pg-meta] [ETCD: etcd] " }

TASK [pg_id : get pgsql identity] ***** ok: [192.168.1.125]

TASK [pg_id : build pgsql identity] *** ok: [192.168.1.125]

TASK [pg_id : print pgsql identity] *** ok: [192.168.1.125] => { "msg": " [primary] pg-meta-1 @ 192.168.1.125 , ins = pg-meta-1 , cls = pg-meta , CLUSTER LEADER @ pg-meta-1 , postgres://192.168.1.125:5432/postgres" }

TASK [pgsql : lookup pg packages & extensions names] ** ok: [192.168.1.125]

TASK [pgsql : install postgres extensions] **** failed: [192.168.1.125] (item=postgresql-17-pg-search,postgresql-17-pg-bigm,postgresql-17-zhparser,postgresql-17-hunspell-cs-cz,postgresql-17-hunspell-de-de,postgresql-17-hunspell-en-us,postgresql-17-hunspell-fr,postgresql-17-hunspell-ne-np,postgresql-17-hunspell-nl-nl,postgresql-17-hunspell-nn-no,postgresql-17-hunspell-pt-pt,postgresql-17-hunspell-ru-ru,postgresql-17-hunspell-ru-ru-aot) => {"ansible_loop_var": "item", "cache_update_time": 1732866622, "cache_updated": false, "changed": false, "item": "postgresql-17-pg-search,postgresql-17-pg-bigm,postgresql-17-zhparser,postgresql-17-hunspell-cs-cz,postgresql-17-hunspell-de-de,postgresql-17-hunspell-en-us,postgresql-17-hunspell-fr,postgresql-17-hunspell-ne-np,postgresql-17-hunspell-nl-nl,postgresql-17-hunspell-nn-no,postgresql-17-hunspell-pt-pt,postgresql-17-hunspell-ru-ru,postgresql-17-hunspell-ru-ru-aot", "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\" install 'postgresql-17-pg-search=0.13.0' 'postgresql-17-pg-bigm=1.2-1PIGSTY~bookworm' 'postgresql-17-zhparser=2.2-1PIGSTY~bookworm' 'postgresql-17-hunspell-cs-cz=1.0-1PIGSTY~bookworm' 'postgresql-17-hunspell-de-de=1.0-1PIGSTY~bookworm' 'postgresql-17-hunspell-en-us=1.0-1PIGSTY~bookworm' 'postgresql-17-hunspell-fr=1.0-1PIGSTY~bookworm' 'postgresql-17-hunspell-ne-np=1.0-1PIGSTY~bookworm' 'postgresql-17-hunspell-nl-nl=1.0-1PIGSTY~bookworm' 'postgresql-17-hunspell-nn-no=1.0-1PIGSTY~bookworm' 'postgresql-17-hunspell-pt-pt=1.0-1PIGSTY~bookworm' 'postgresql-17-hunspell-ru-ru=1.0-1PIGSTY~bookworm' 'postgresql-17-hunspell-ru-ru-aot=1.0-1PIGSTY~bookworm'' failed: E: Sub-process /usr/bin/dpkg returned an error code (1)\n", "rc": 100, "stderr": "E: Sub-process /usr/bin/dpkg returned an error code (1)\n", "stderr_lines": ["E: Sub-process /usr/bin/dpkg returned an error code (1)"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following additional packages will be installed:\n scws\nThe following NEW packages will be installed:\n postgresql-17-hunspell-cs-cz postgresql-17-hunspell-de-de\n postgresql-17-hunspell-en-us postgresql-17-hunspell-fr\n postgresql-17-hunspell-ne-np postgresql-17-hunspell-nl-nl\n postgresql-17-hunspell-nn-no postgresql-17-hunspell-pt-pt\n postgresql-17-hunspell-ru-ru postgresql-17-hunspell-ru-ru-aot\n postgresql-17-pg-bigm postgresql-17-pg-search postgresql-17-zhparser scws\n0 upgraded, 14 newly installed, 0 to remove and 29 not upgraded.\nNeed to get 55.3 MB of archives.\nAfter this operation, 44.0 MB of additional disk space will be used.\nGet:1 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-cs-cz 1.0-1PIGSTY~bookworm [516 kB]\nGet:2 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-de-de 1.0-1PIGSTY~bookworm [951 kB]\nGet:3 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-en-us 1.0-1PIGSTY~bookworm [161 kB]\nGet:4 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-fr 1.0-1PIGSTY~bookworm [307 kB]\nGet:5 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-ne-np 1.0-1PIGSTY~bookworm [140 kB]\nGet:6 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-nl-nl 1.0-1PIGSTY~bookworm [529 kB]\nGet:7 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-nn-no 1.0-1PIGSTY~bookworm [748 kB]\nGet:8 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-pt-pt 1.0-1PIGSTY~bookworm [194 kB]\nGet:9 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-ru-ru 1.0-1PIGSTY~bookworm [477 kB]\nGet:10 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-ru-ru-aot 1.0-1PIGSTY~bookworm [1115 kB]\nGet:11 http://192.168.1.125/pigsty ./ postgresql-17-pg-bigm 1.2-1PIGSTY~bookworm [31.4 kB]\nGet:12 http://192.168.1.125/pigsty ./ postgresql-17-pg-search 0.13.0 [45.8 MB]\nGet:13 http://192.168.1.125/pigsty ./ scws 1.2.3-1PIGSTY~bookworm [45.6 kB]\nGet:14 http://192.168.1.125/pigsty ./ postgresql-17-zhparser 2.2-1PIGSTY~bookworm [4245 kB]\nFetched 55.3 MB in 0s (153 MB/s)\nSelecting previously unselected package postgresql-17-hunspell-cs-cz.\r\n(Reading database ... \r(Reading database ... 5%\r(Reading database ... 10%\r(Reading database ... 15%\r(Reading database ... 20%\r(Reading database ... 25%\r(Reading database ... 30%\r(Reading database ... 35%\r(Reading database ... 40%\r(Reading database ... 45%\r(Reading database ... 50%\r(Reading database ... 55%\r(Reading database ... 60%\r(Reading database ... 65%\r(Reading database ... 70%\r(Reading database ... 75%\r(Reading database ... 80%\r(Reading database ... 85%\r(Reading database ... 90%\r(Reading database ... 95%\r(Reading database ... 100%\r(Reading database ... 88765 files and directories currently installed.)\r\nPreparing to unpack .../00-postgresql-17-hunspell-cs-cz_1.0-1PIGSTY~bookworm_amd64.deb ...\r\nUnpacking postgresql-17-hunspell-cs-cz (1.0-1PIGSTY~bookworm) ...\r\nSelecting previously unselected package postgresql-17-hunspell-de-de.\r\nPreparing to unpack .../01-postgresql-17-hunspell-de-de_1.0-1PIGSTY~bookworm_amd64.deb ...\r\nUnpacking postgresql-17-hunspell-de-de (1.0-1PIGSTY~bookworm) ...\r\nSelecting previously unselected package postgresql-17-hunspell-en-us.\r\nPreparing to unpack .../02-postgresql-17-hunspell-en-us_1.0-1PIGSTY~bookworm_amd64.deb ...\r\nUnpacking postgresql-17-hunspell-en-us (1.0-1PIGSTY~bookworm) ...\r\nSelecting previously unselected package postgresql-17-hunspell-fr.\r\nPreparing to unpack .../03-postgresql-17-hunspell-fr_1.0-1PIGSTY~bookworm_amd64.deb ...\r\nUnpacking postgresql-17-hunspell-fr (1.0-1PIGSTY~bookworm) ...\r\nSelecting previously unselected package postgresql-17-hunspell-ne-np.\r\nPreparing to unpack .../04-postgresql-17-hunspell-ne-np_1.0-1PIGSTY~bookworm_amd64.deb ...\r\nUnpacking postgresql-17-hunspell-ne-np (1.0-1PIGSTY~bookworm) ...\r\nSelecting previously unselected package postgresql-17-hunspell-nl-nl.\r\nPreparing to unpack .../05-postgresql-17-hunspell-nl-nl_1.0-1PIGSTY~bookworm_amd64.deb ...\r\nUnpacking postgresql-17-hunspell-nl-nl (1.0-1PIGSTY~bookworm) ...\r\nSelecting previously unselected package postgresql-17-hunspell-nn-no.\r\nPreparing to unpack .../06-postgresql-17-hunspell-nn-no_1.0-1PIGSTY~bookworm_amd64.deb ...\r\nUnpacking postgresql-17-hunspell-nn-no (1.0-1PIGSTY~bookworm) ...\r\nSelecting previously unselected package postgresql-17-hunspell-pt-pt.\r\nPreparing to unpack .../07-postgresql-17-hunspell-pt-pt_1.0-1PIGSTY~bookworm_amd64.deb ...\r\nUnpacking postgresql-17-hunspell-pt-pt (1.0-1PIGSTY~bookworm) ...\r\ndpkg: error processing archive /tmp/apt-dpkg-install-RsoiwE/07-postgresql-17-hunspell-pt-pt_1.0-1PIGSTY~bookworm_amd64.deb (--unpack):\r\n trying to overwrite '/usr/share/postgresql/17/tsearch_data/portuguese.stop', which is also in package postgresql-17 17.2-1.pgdg120+1\r\nSelecting previously unselected package postgresql-17-hunspell-ru-ru.\r\nPreparing to unpack .../08-postgresql-17-hunspell-ru-ru_1.0-1PIGSTY~bookworm_amd64.deb ...\r\nUnpacking postgresql-17-hunspell-ru-ru (1.0-1PIGSTY~bookworm) ...\r\nSelecting previously unselected package postgresql-17-hunspell-ru-ru-aot.\r\nPreparing to unpack .../09-postgresql-17-hunspell-ru-ru-aot_1.0-1PIGSTY~bookworm_amd64.deb ...\r\nUnpacking postgresql-17-hunspell-ru-ru-aot (1.0-1PIGSTY~bookworm) ...\r\nSelecting previously unselected package postgresql-17-pg-bigm.\r\nPreparing to unpack .../10-postgresql-17-pg-bigm_1.2-1PIGSTY~bookworm_amd64.deb ...\r\nUnpacking postgresql-17-pg-bigm (1.2-1PIGSTY~bookworm) ...\r\nSelecting previously unselected package postgresql-17-pg-search.\r\nPreparing to unpack .../11-postgresql-17-pg-search_0.13.0_amd64.deb ...\r\nUnpacking postgresql-17-pg-search (0.13.0) ...\r\nSelecting previously unselected package scws.\r\nPreparing to unpack .../12-scws_1.2.3-1PIGSTY~bookworm_amd64.deb ...\r\nUnpacking scws (1.2.3-1PIGSTY~bookworm) ...\r\nSelecting previously unselected package postgresql-17-zhparser.\r\nPreparing to unpack .../13-postgresql-17-zhparser_2.2-1PIGSTY~bookworm_amd64.deb ...\r\nUnpacking postgresql-17-zhparser (2.2-1PIGSTY~bookworm) ...\r\nErrors were encountered while processing:\r\n /tmp/apt-dpkg-install-RsoiwE/07-postgresql-17-hunspell-pt-pt_1.0-1PIGSTY~bookworm_amd64.deb\r\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following additional packages will be installed:", " scws", "The following NEW packages will be installed:", " postgresql-17-hunspell-cs-cz postgresql-17-hunspell-de-de", " postgresql-17-hunspell-en-us postgresql-17-hunspell-fr", " postgresql-17-hunspell-ne-np postgresql-17-hunspell-nl-nl", " postgresql-17-hunspell-nn-no postgresql-17-hunspell-pt-pt", " postgresql-17-hunspell-ru-ru postgresql-17-hunspell-ru-ru-aot", " postgresql-17-pg-bigm postgresql-17-pg-search postgresql-17-zhparser scws", "0 upgraded, 14 newly installed, 0 to remove and 29 not upgraded.", "Need to get 55.3 MB of archives.", "After this operation, 44.0 MB of additional disk space will be used.", "Get:1 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-cs-cz 1.0-1PIGSTY~bookworm [516 kB]", "Get:2 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-de-de 1.0-1PIGSTY~bookworm [951 kB]", "Get:3 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-en-us 1.0-1PIGSTY~bookworm [161 kB]", "Get:4 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-fr 1.0-1PIGSTY~bookworm [307 kB]", "Get:5 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-ne-np 1.0-1PIGSTY~bookworm [140 kB]", "Get:6 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-nl-nl 1.0-1PIGSTY~bookworm [529 kB]", "Get:7 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-nn-no 1.0-1PIGSTY~bookworm [748 kB]", "Get:8 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-pt-pt 1.0-1PIGSTY~bookworm [194 kB]", "Get:9 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-ru-ru 1.0-1PIGSTY~bookworm [477 kB]", "Get:10 http://192.168.1.125/pigsty ./ postgresql-17-hunspell-ru-ru-aot 1.0-1PIGSTY~bookworm [1115 kB]", "Get:11 http://192.168.1.125/pigsty ./ postgresql-17-pg-bigm 1.2-1PIGSTY~bookworm [31.4 kB]", "Get:12 http://192.168.1.125/pigsty ./ postgresql-17-pg-search 0.13.0 [45.8 MB]", "Get:13 http://192.168.1.125/pigsty ./ scws 1.2.3-1PIGSTY~bookworm [45.6 kB]", "Get:14 http://192.168.1.125/pigsty ./ postgresql-17-zhparser 2.2-1PIGSTY~bookworm [4245 kB]", "Fetched 55.3 MB in 0s (153 MB/s)", "Selecting previously unselected package postgresql-17-hunspell-cs-cz.", "(Reading database ... ", "(Reading database ... 5%", "(Reading database ... 10%", "(Reading database ... 15%", "(Reading database ... 20%", "(Reading database ... 25%", "(Reading database ... 30%", "(Reading database ... 35%", "(Reading database ... 40%", "(Reading database ... 45%", "(Reading database ... 50%", "(Reading database ... 55%", "(Reading database ... 60%", "(Reading database ... 65%", "(Reading database ... 70%", "(Reading database ... 75%", "(Reading database ... 80%", "(Reading database ... 85%", "(Reading database ... 90%", "(Reading database ... 95%", "(Reading database ... 100%", "(Reading database ... 88765 files and directories currently installed.)", "Preparing to unpack .../00-postgresql-17-hunspell-cs-cz_1.0-1PIGSTY~bookworm_amd64.deb ...", "Unpacking postgresql-17-hunspell-cs-cz (1.0-1PIGSTY~bookworm) ...", "Selecting previously unselected package postgresql-17-hunspell-de-de.", "Preparing to unpack .../01-postgresql-17-hunspell-de-de_1.0-1PIGSTY~bookworm_amd64.deb ...", "Unpacking postgresql-17-hunspell-de-de (1.0-1PIGSTY~bookworm) ...", "Selecting previously unselected package postgresql-17-hunspell-en-us.", "Preparing to unpack .../02-postgresql-17-hunspell-en-us_1.0-1PIGSTY~bookworm_amd64.deb ...", "Unpacking postgresql-17-hunspell-en-us (1.0-1PIGSTY~bookworm) ...", "Selecting previously unselected package postgresql-17-hunspell-fr.", "Preparing to unpack .../03-postgresql-17-hunspell-fr_1.0-1PIGSTY~bookworm_amd64.deb ...", "Unpacking postgresql-17-hunspell-fr (1.0-1PIGSTY~bookworm) ...", "Selecting previously unselected package postgresql-17-hunspell-ne-np.", "Preparing to unpack .../04-postgresql-17-hunspell-ne-np_1.0-1PIGSTY~bookworm_amd64.deb ...", "Unpacking postgresql-17-hunspell-ne-np (1.0-1PIGSTY~bookworm) ...", "Selecting previously unselected package postgresql-17-hunspell-nl-nl.", "Preparing to unpack .../05-postgresql-17-hunspell-nl-nl_1.0-1PIGSTY~bookworm_amd64.deb ...", "Unpacking postgresql-17-hunspell-nl-nl (1.0-1PIGSTY~bookworm) ...", "Selecting previously unselected package postgresql-17-hunspell-nn-no.", "Preparing to unpack .../06-postgresql-17-hunspell-nn-no_1.0-1PIGSTY~bookworm_amd64.deb ...", "Unpacking postgresql-17-hunspell-nn-no (1.0-1PIGSTY~bookworm) ...", "Selecting previously unselected package postgresql-17-hunspell-pt-pt.", "Preparing to unpack .../07-postgresql-17-hunspell-pt-pt_1.0-1PIGSTY~bookworm_amd64.deb ...", "Unpacking postgresql-17-hunspell-pt-pt (1.0-1PIGSTY~bookworm) ...", "dpkg: error processing archive /tmp/apt-dpkg-install-RsoiwE/07-postgresql-17-hunspell-pt-pt_1.0-1PIGSTY~bookworm_amd64.deb (--unpack):", " trying to overwrite '/usr/share/postgresql/17/tsearch_data/portuguese.stop', which is also in package postgresql-17 17.2-1.pgdg120+1", "Selecting previously unselected package postgresql-17-hunspell-ru-ru.", "Preparing to unpack .../08-postgresql-17-hunspell-ru-ru_1.0-1PIGSTY~bookworm_amd64.deb ...", "Unpacking postgresql-17-hunspell-ru-ru (1.0-1PIGSTY~bookworm) ...", "Selecting previously unselected package postgresql-17-hunspell-ru-ru-aot.", "Preparing to unpack .../09-postgresql-17-hunspell-ru-ru-aot_1.0-1PIGSTY~bookworm_amd64.deb ...", "Unpacking postgresql-17-hunspell-ru-ru-aot (1.0-1PIGSTY~bookworm) ...", "Selecting previously unselected package postgresql-17-pg-bigm.", "Preparing to unpack .../10-postgresql-17-pg-bigm_1.2-1PIGSTY~bookworm_amd64.deb ...", "Unpacking postgresql-17-pg-bigm (1.2-1PIGSTY~bookworm) ...", "Selecting previously unselected package postgresql-17-pg-search.", "Preparing to unpack .../11-postgresql-17-pg-search_0.13.0_amd64.deb ...", "Unpacking postgresql-17-pg-search (0.13.0) ...", "Selecting previously unselected package scws.", "Preparing to unpack .../12-scws_1.2.3-1PIGSTY~bookworm_amd64.deb ...", "Unpacking scws (1.2.3-1PIGSTY~bookworm) ...", "Selecting previously unselected package postgresql-17-zhparser.", "Preparing to unpack .../13-postgresql-17-zhparser_2.2-1PIGSTY~bookworm_amd64.deb ...", "Unpacking postgresql-17-zhparser (2.2-1PIGSTY~bookworm) ...", "Errors were encountered while processing:", " /tmp/apt-dpkg-install-RsoiwE/07-postgresql-17-hunspell-pt-pt_1.0-1PIGSTY~bookworm_amd64.deb"]} ok: [192.168.1.125] => (item=postgresql-17-pgvector)

PLAY RECAP **** 192.168.1.125 : ok=9 changed=1 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0

Vonng commented 19 hours ago

Through the error msg is vague, but I guess this is something relate with hunspell-pt-pt, which conflict with postgres built-in dict, I suggest removing that package from the list.