From bb1367025a0295ef5ee8b1df0266919002f1f04b Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 23 Sep 2024 13:10:20 +0300 Subject: [PATCH] Add notes for 2024-09-23 --- content/posts/2024-09.md | 45 +++++++++++++++++++++++++ docs/2024-09/index.html | 45 +++++++++++++++++++++++-- docs/categories/index.html | 2 +- docs/categories/index.xml | 2 +- docs/categories/notes/index.html | 2 +- docs/categories/notes/index.xml | 2 +- docs/categories/notes/page/2/index.html | 2 +- docs/categories/notes/page/3/index.html | 2 +- docs/categories/notes/page/4/index.html | 2 +- docs/categories/notes/page/5/index.html | 2 +- docs/categories/notes/page/6/index.html | 2 +- docs/categories/notes/page/7/index.html | 2 +- docs/categories/notes/page/8/index.html | 2 +- docs/categories/notes/page/9/index.html | 2 +- docs/index.html | 2 +- docs/index.xml | 2 +- docs/page/10/index.html | 2 +- docs/page/11/index.html | 2 +- docs/page/2/index.html | 2 +- docs/page/3/index.html | 2 +- docs/page/4/index.html | 2 +- docs/page/5/index.html | 2 +- docs/page/6/index.html | 2 +- docs/page/7/index.html | 2 +- docs/page/8/index.html | 2 +- docs/page/9/index.html | 2 +- docs/posts/index.html | 2 +- docs/posts/index.xml | 2 +- docs/posts/page/10/index.html | 2 +- docs/posts/page/11/index.html | 2 +- docs/posts/page/2/index.html | 2 +- docs/posts/page/3/index.html | 2 +- docs/posts/page/4/index.html | 2 +- docs/posts/page/5/index.html | 2 +- docs/posts/page/6/index.html | 2 +- docs/posts/page/7/index.html | 2 +- docs/posts/page/8/index.html | 2 +- docs/posts/page/9/index.html | 2 +- docs/sitemap.xml | 10 +++--- 39 files changed, 128 insertions(+), 44 deletions(-) diff --git a/content/posts/2024-09.md b/content/posts/2024-09.md index a0b6833d4..fdc2f6151 100644 --- a/content/posts/2024-09.md +++ b/content/posts/2024-09.md @@ -96,4 +96,49 @@ Mozilla/5.0 (Windows; U; Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0 ![Solr with 4g heap](/cgspace-notes/2024/09/2024-09-16-Solr-4g-heap.png) +## 2024-09-23 + +- Upgrade PostgreSQL from version 14 to 15 on DSpace Test the same way I did last year: + +```console +# apt update +# apt install postgresql-15 +# Update configs with Ansible +# systemctl stop tomcat9 +# pg_ctlcluster 14 main stop +# tar -cvzpf var-lib-postgresql-14.tar.gz /var/lib/postgresql/14 +# tar -cvzpf etc-postgresql-14.tar.gz /etc/postgresql/14 +# pg_ctlcluster 15 main stop +# pg_dropcluster 15 main +# pg_upgradecluster 14 main +# pg_ctlcluster 15 main start +... + +ERROR: could not find function "xml_is_well_formed" in file "/usr/lib/postgresql/15/lib/pgxml.so" +ERROR: function public.xml_is_well_formed(text) does not exist +ERROR: could not find function "xml_is_well_formed" in file "/usr/lib/postgresql/15/lib/pgxml.so" +ERROR: function public.xml_valid(text) does not exist +``` + + +- After that I [re-indexed the database indexes](https://adamj.eu/tech/2021/04/13/reindexing-all-tables-after-upgrading-to-postgresql-13/) using a query: + +```console +$ su - postgres +$ cat /tmp/generate-reindex.sql +SELECT 'REINDEX TABLE CONCURRENTLY ' || quote_ident(relname) || ' /*' || pg_size_pretty(pg_total_relation_size(C.oid)) || '*/;' +FROM pg_class C +LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) +WHERE nspname = 'public' + AND C.relkind = 'r' + AND nspname !~ '^pg_toast' +ORDER BY pg_total_relation_size(C.oid) ASC; +$ psql dspace < /tmp/generate-reindex.sql > /tmp/reindex.sql +$ +$ psql dspace < /tmp/reindex.sql +``` + +- The database shrunk by 186MB! + + diff --git a/docs/2024-09/index.html b/docs/2024-09/index.html index 4cf8dab5a..9d71cdde9 100644 --- a/docs/2024-09/index.html +++ b/docs/2024-09/index.html @@ -14,7 +14,7 @@ Upgrade CGSpace to DSpace 7.6.2 - + @@ -34,9 +34,9 @@ Upgrade CGSpace to DSpace 7.6.2 "@type": "BlogPosting", "headline": "September, 2024", "url": "https://alanorth.github.io/cgspace-notes/2024-09/", - "wordCount": "579", + "wordCount": "759", "datePublished": "2024-09-01T21:16:00-07:00", - "dateModified": "2024-09-14T23:02:16+03:00", + "dateModified": "2024-09-17T08:11:03+04:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -203,6 +203,45 @@ Mozilla/5.0 (Windows; U; Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0

Solr with 3g heap

Solr with 4g heap

+

2024-09-23

+ +
# apt update
+# apt install postgresql-15
+# Update configs with Ansible
+# systemctl stop tomcat9
+# pg_ctlcluster 14 main stop
+# tar -cvzpf var-lib-postgresql-14.tar.gz /var/lib/postgresql/14
+# tar -cvzpf etc-postgresql-14.tar.gz /etc/postgresql/14
+# pg_ctlcluster 15 main stop
+# pg_dropcluster 15 main
+# pg_upgradecluster 14 main
+# pg_ctlcluster 15 main start
+...
+
+ERROR:  could not find function "xml_is_well_formed" in file "/usr/lib/postgresql/15/lib/pgxml.so"
+ERROR:  function public.xml_is_well_formed(text) does not exist
+ERROR:  could not find function "xml_is_well_formed" in file "/usr/lib/postgresql/15/lib/pgxml.so"
+ERROR:  function public.xml_valid(text) does not exist
+
+
$ su - postgres
+$ cat /tmp/generate-reindex.sql
+SELECT 'REINDEX TABLE CONCURRENTLY ' || quote_ident(relname) || ' /*' || pg_size_pretty(pg_total_relation_size(C.oid)) || '*/;'
+FROM pg_class C
+LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
+WHERE nspname = 'public'
+  AND C.relkind = 'r'
+  AND nspname !~ '^pg_toast'
+ORDER BY pg_total_relation_size(C.oid) ASC;
+$ psql dspace < /tmp/generate-reindex.sql > /tmp/reindex.sql
+$ <trim the extra stuff from /tmp/reindex.sql>
+$ psql dspace < /tmp/reindex.sql
+
diff --git a/docs/categories/index.html b/docs/categories/index.html index 873e4acfb..9bb54f771 100644 --- a/docs/categories/index.html +++ b/docs/categories/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/index.xml b/docs/categories/index.xml index 1aedb843d..1616c4cb9 100644 --- a/docs/categories/index.xml +++ b/docs/categories/index.xml @@ -6,7 +6,7 @@ Recent content in Categories on CGSpace Notes Hugo en-us - Sat, 14 Sep 2024 23:02:16 +0300 + Tue, 17 Sep 2024 08:11:03 +0400 Notes diff --git a/docs/categories/notes/index.html b/docs/categories/notes/index.html index 35848e5b6..c576eeb01 100644 --- a/docs/categories/notes/index.html +++ b/docs/categories/notes/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/index.xml b/docs/categories/notes/index.xml index cf016e1d6..12bad4e0e 100644 --- a/docs/categories/notes/index.xml +++ b/docs/categories/notes/index.xml @@ -6,7 +6,7 @@ Recent content in Notes on CGSpace Notes Hugo en-us - Sat, 14 Sep 2024 23:02:16 +0300 + Tue, 17 Sep 2024 08:11:03 +0400 September, 2024 diff --git a/docs/categories/notes/page/2/index.html b/docs/categories/notes/page/2/index.html index 7759239b2..7be609a1e 100644 --- a/docs/categories/notes/page/2/index.html +++ b/docs/categories/notes/page/2/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/3/index.html b/docs/categories/notes/page/3/index.html index 04fd19617..749e116b9 100644 --- a/docs/categories/notes/page/3/index.html +++ b/docs/categories/notes/page/3/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/4/index.html b/docs/categories/notes/page/4/index.html index ce9e543a0..96d608bfb 100644 --- a/docs/categories/notes/page/4/index.html +++ b/docs/categories/notes/page/4/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/5/index.html b/docs/categories/notes/page/5/index.html index 1f2a9c3b1..ffc85bc9e 100644 --- a/docs/categories/notes/page/5/index.html +++ b/docs/categories/notes/page/5/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/6/index.html b/docs/categories/notes/page/6/index.html index 10c811929..24f5bd4cc 100644 --- a/docs/categories/notes/page/6/index.html +++ b/docs/categories/notes/page/6/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/7/index.html b/docs/categories/notes/page/7/index.html index 0f72e0989..7a226f290 100644 --- a/docs/categories/notes/page/7/index.html +++ b/docs/categories/notes/page/7/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/8/index.html b/docs/categories/notes/page/8/index.html index 1f0085322..0b018e1c7 100644 --- a/docs/categories/notes/page/8/index.html +++ b/docs/categories/notes/page/8/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/9/index.html b/docs/categories/notes/page/9/index.html index 32397352d..58fb67e0a 100644 --- a/docs/categories/notes/page/9/index.html +++ b/docs/categories/notes/page/9/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/index.html b/docs/index.html index 56c743b76..bb2f25c01 100644 --- a/docs/index.html +++ b/docs/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/index.xml b/docs/index.xml index d5a3ffe01..e46ae6e59 100644 --- a/docs/index.xml +++ b/docs/index.xml @@ -6,7 +6,7 @@ Recent content on CGSpace Notes Hugo en-us - Sat, 14 Sep 2024 23:02:16 +0300 + Tue, 17 Sep 2024 08:11:03 +0400 September, 2024 diff --git a/docs/page/10/index.html b/docs/page/10/index.html index aefb34e7e..7f5525410 100644 --- a/docs/page/10/index.html +++ b/docs/page/10/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/11/index.html b/docs/page/11/index.html index 642f4ab95..939d1dafc 100644 --- a/docs/page/11/index.html +++ b/docs/page/11/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/2/index.html b/docs/page/2/index.html index 90b458110..de4906d07 100644 --- a/docs/page/2/index.html +++ b/docs/page/2/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/3/index.html b/docs/page/3/index.html index 6683cb070..38f210d1b 100644 --- a/docs/page/3/index.html +++ b/docs/page/3/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/4/index.html b/docs/page/4/index.html index 8e1f4d52d..07a70f820 100644 --- a/docs/page/4/index.html +++ b/docs/page/4/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/5/index.html b/docs/page/5/index.html index da7d9d15d..5d691b437 100644 --- a/docs/page/5/index.html +++ b/docs/page/5/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/6/index.html b/docs/page/6/index.html index 716c10cdd..a67c34082 100644 --- a/docs/page/6/index.html +++ b/docs/page/6/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/7/index.html b/docs/page/7/index.html index 38888118f..1fad21b09 100644 --- a/docs/page/7/index.html +++ b/docs/page/7/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/8/index.html b/docs/page/8/index.html index 67020bec4..a47833cc0 100644 --- a/docs/page/8/index.html +++ b/docs/page/8/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/9/index.html b/docs/page/9/index.html index e867e87c2..0be0b0574 100644 --- a/docs/page/9/index.html +++ b/docs/page/9/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/index.html b/docs/posts/index.html index d5821c52d..0b7a62296 100644 --- a/docs/posts/index.html +++ b/docs/posts/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/index.xml b/docs/posts/index.xml index b213ef279..0e4108975 100644 --- a/docs/posts/index.xml +++ b/docs/posts/index.xml @@ -6,7 +6,7 @@ Recent content in Posts on CGSpace Notes Hugo en-us - Sat, 14 Sep 2024 23:02:16 +0300 + Tue, 17 Sep 2024 08:11:03 +0400 September, 2024 diff --git a/docs/posts/page/10/index.html b/docs/posts/page/10/index.html index 0f6737aa8..a4fe1dc4e 100644 --- a/docs/posts/page/10/index.html +++ b/docs/posts/page/10/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/11/index.html b/docs/posts/page/11/index.html index 330cc006e..0998a243e 100644 --- a/docs/posts/page/11/index.html +++ b/docs/posts/page/11/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/2/index.html b/docs/posts/page/2/index.html index 6d23ce83b..67ff357a7 100644 --- a/docs/posts/page/2/index.html +++ b/docs/posts/page/2/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/3/index.html b/docs/posts/page/3/index.html index f15500687..4b3703ee8 100644 --- a/docs/posts/page/3/index.html +++ b/docs/posts/page/3/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/4/index.html b/docs/posts/page/4/index.html index c74e562a5..31399db79 100644 --- a/docs/posts/page/4/index.html +++ b/docs/posts/page/4/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/5/index.html b/docs/posts/page/5/index.html index c110cadc9..bb9ca9a06 100644 --- a/docs/posts/page/5/index.html +++ b/docs/posts/page/5/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/6/index.html b/docs/posts/page/6/index.html index 39a69aaf8..7cd4553d6 100644 --- a/docs/posts/page/6/index.html +++ b/docs/posts/page/6/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/7/index.html b/docs/posts/page/7/index.html index d862bf191..728528eb5 100644 --- a/docs/posts/page/7/index.html +++ b/docs/posts/page/7/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/8/index.html b/docs/posts/page/8/index.html index 63fe4402e..63f1ebd91 100644 --- a/docs/posts/page/8/index.html +++ b/docs/posts/page/8/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/9/index.html b/docs/posts/page/9/index.html index 2c56fcf6d..e343562ae 100644 --- a/docs/posts/page/9/index.html +++ b/docs/posts/page/9/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 893ca8579..c8a6f9861 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -3,19 +3,19 @@ xmlns:xhtml="http://www.w3.org/1999/xhtml"> https://alanorth.github.io/cgspace-notes/categories/ - 2024-09-14T23:02:16+03:00 + 2024-09-17T08:11:03+04:00 https://alanorth.github.io/cgspace-notes/ - 2024-09-14T23:02:16+03:00 + 2024-09-17T08:11:03+04:00 https://alanorth.github.io/cgspace-notes/categories/notes/ - 2024-09-14T23:02:16+03:00 + 2024-09-17T08:11:03+04:00 https://alanorth.github.io/cgspace-notes/posts/ - 2024-09-14T23:02:16+03:00 + 2024-09-17T08:11:03+04:00 https://alanorth.github.io/cgspace-notes/2024-09/ - 2024-09-14T23:02:16+03:00 + 2024-09-17T08:11:03+04:00 https://alanorth.github.io/cgspace-notes/2024-08/ 2024-08-28T11:35:05+03:00