{
    "version": "https:\/\/jsonfeed.org\/version\/1",
    "title": "Максим Кузнецов: заметки с тегом postgres",
    "_rss_description": "Простыми словами о веб-разработке",
    "_rss_language": "ru",
    "_itunes_email": "",
    "_itunes_categories_xml": "",
    "_itunes_image": "",
    "_itunes_explicit": "",
    "home_page_url": "https:\/\/maxkuznetsov.ru\/tags\/postgres\/",
    "feed_url": "https:\/\/maxkuznetsov.ru\/tags\/postgres\/json\/",
    "icon": "https:\/\/maxkuznetsov.ru\/user\/userpic@2x.jpg?1586398004",
    "author": {
        "name": "Максим Кузнецов",
        "url": "https:\/\/maxkuznetsov.ru\/",
        "avatar": "https:\/\/maxkuznetsov.ru\/user\/userpic@2x.jpg?1586398004"
    },
    "items": [
        {
            "id": "45",
            "url": "https:\/\/maxkuznetsov.ru\/all\/kak-uznat-obschiy-ves-bazy-dannyh-i-nayti-samye-tyazhyolye-tabli\/",
            "title": "Как узнать общий вес базы данных и найти самые тяжёлые таблицы",
            "content_html": "<p>Вес баз данных<\/p>\n<pre class=\"e2-text-code\"><code class=\"\">SELECT table_schema AS &quot;Database&quot;, \r\nROUND(SUM(data_length + index_length) \/ 1024 \/ 1024 \/ 1024, 2) AS &quot;Size (GB)&quot; \r\nFROM information_schema.TABLES \r\nGROUP BY table_schema;<\/code><\/pre><p>Размер таблиц, включая отдельно данные и отдельно индексы.<\/p>\n<pre class=\"e2-text-code\"><code class=\"\">SELECT CONCAT(table_schema, '.', table_name),\r\n       CONCAT(ROUND(table_rows \/ 1000000, 2), 'M')                                    `rows`,\r\n       CONCAT(ROUND(data_length \/ ( 1024 * 1024 * 1024 ), 2), 'G')                    DATA,\r\n       CONCAT(ROUND(index_length \/ ( 1024 * 1024 * 1024 ), 2), 'G')                   idx,\r\n       CONCAT(ROUND(( data_length + index_length ) \/ ( 1024 * 1024 * 1024 ), 2), 'G') total_size,\r\n       ROUND(index_length \/ data_length, 2)                                           idxfrac\r\nFROM   information_schema.TABLES\r\nORDER  BY data_length + index_length DESC\r\nLIMIT  20;<\/code><\/pre>",
            "date_published": "2023-10-31T12:13:08+03:00",
            "date_modified": "2023-10-31T12:12:57+03:00",
            "_date_published_rfc2822": "Tue, 31 Oct 2023 12:13:08 +0300",
            "_rss_guid_is_permalink": "false",
            "_rss_guid": "45",
            "_e2_data": {
                "is_favourite": false,
                "links_required": [
                    "system\/library\/highlight\/highlight.js",
                    "system\/library\/highlight\/highlight.css",
                    "system\/library\/highlight\/highlight.js",
                    "system\/library\/highlight\/highlight.css",
                    "system\/library\/highlight\/highlight.js",
                    "system\/library\/highlight\/highlight.css",
                    "system\/library\/highlight\/highlight.js",
                    "system\/library\/highlight\/highlight.css"
                ],
                "og_images": []
            }
        },
        {
            "id": "6",
            "url": "https:\/\/maxkuznetsov.ru\/all\/postgres-install-extension\/",
            "title": "Как установить расширение в Postgres",
            "content_html": "<p>Переключаемся в юзера Postgres:<\/p>\n<pre class=\"e2-text-code\"><code class=\"\">$ su postgres<\/code><\/pre><p>Заходим в базу и выполняем следующие команды (на примере установки uuid-ossp):<\/p>\n<pre class=\"e2-text-code\"><code class=\"sql\">ALTER USER myuser WITH SUPERUSER;\r\nCREATE EXTENSION IF NOT EXISTS &quot;uuid-ossp&quot;;\r\nALTER USER myuser WITH NOSUPERUSER;<\/code><\/pre>",
            "date_published": "2020-05-02T00:05:16+03:00",
            "date_modified": "2020-05-02T00:05:12+03:00",
            "_date_published_rfc2822": "Sat, 02 May 2020 00:05:16 +0300",
            "_rss_guid_is_permalink": "false",
            "_rss_guid": "6",
            "_e2_data": {
                "is_favourite": false,
                "links_required": [
                    "system\/library\/highlight\/highlight.js",
                    "system\/library\/highlight\/highlight.css",
                    "system\/library\/highlight\/highlight.js",
                    "system\/library\/highlight\/highlight.css",
                    "system\/library\/highlight\/highlight.js",
                    "system\/library\/highlight\/highlight.css",
                    "system\/library\/highlight\/highlight.js",
                    "system\/library\/highlight\/highlight.css"
                ],
                "og_images": []
            }
        }
    ],
    "_e2_version": 3559,
    "_e2_ua_string": "E2 (v3559; Aegea)"
}