Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pjzUW-0007pk-TP for pgsql-novice@arkaria.postgresql.org; Wed, 05 Apr 2023 09:31:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pjzUV-00071i-1h for pgsql-novice@arkaria.postgresql.org; Wed, 05 Apr 2023 09:31:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pjzUU-00071Z-Ow for pgsql-novice@lists.postgresql.org; Wed, 05 Apr 2023 09:31:42 +0000 Received: from mail-yw1-x1131.google.com ([2607:f8b0:4864:20::1131]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pjzUR-0010d1-W9 for pgsql-novice@postgresql.org; Wed, 05 Apr 2023 09:31:42 +0000 Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-536af432ee5so666648317b3.0 for ; Wed, 05 Apr 2023 02:31:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680687098; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=PEGzcpYHd73wXhayrhU2gW6VYqTm4crGWfM5aVjRjXw=; b=I//OxrKE+cqn05JD2LKl/jxBY3D7bfCjDYhTmjRTxjaC2q3KjhT9hB66/lIlaj5/Iu LYK741gP2kLJ7AVatRVBkmLZq17E/d9lbTo8i9J8LNwRYhRrWUaaVMIYSm1IeUYgDB9p qjiyfaJWMyr4Op8Giadcz74XsHNevJe9vsEovyTf/FgDJnU56fwaR8GoN6bNPTaP3CIl HedGiUvdLoq3g6bIeXMu7UFAgboQlcJTajutZAnlh9LbramrcB2nHrZ1i7sCFbKQCNyM saR+d0dmOCaE+gJrKe9FpDKKJTmgeM2DiIMryMEQq1kB2yYiYmSwFsZYHIqUQBb2gLar dWdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680687098; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PEGzcpYHd73wXhayrhU2gW6VYqTm4crGWfM5aVjRjXw=; b=nDWv8R7qV0f8DophxQg2uHUanI1u38lnmwOnMNcoMpgJY37/lz2TtNawqd8S6qizF0 xYfqwwSdmNsv2aZAKZfajEEY6gjc1idORkBq3vwIuZzaQjGqaDsIu0LhsiQ/dAz0P2Xc 5ndcX3ToLVx4xJndWghMe9zGeVz5TD2aQbp/e+k90O0HKX1YmHwEaekPN1qDVyy6EHx4 Y+PRbEc6O6VRr1oHcWwq8ZSQqzPGcqGM7QCu+S8ybYfvIaeXbIIZiPPwqrOBuEVP0hYT UgkVA9owyUUUHeejS1KfibGsuQHQwiGepmAcd3Vn3xb8EiyFbVsQkz4jZrVPobOJYaIY NdNg== X-Gm-Message-State: AAQBX9f4odB7Yc/YelK4V1w7Vj+MB6g4gT3V37vduHT50YacyGf2nva/ kmonl8WQ6Wh15MLn3adbtzi8jWsvbf1o/zd44zeBV5e3 X-Google-Smtp-Source: AKy350YHM3DyICZnga+8aR1kfdwVMc9F21Twmk84OSqHjs+R5bNF3v9S+oAwC0mqCoBQmvtn7j5d3KjKAMkKkt+o8BE= X-Received: by 2002:a81:af68:0:b0:545:611c:8d19 with SMTP id x40-20020a81af68000000b00545611c8d19mr3165423ywj.4.1680687098086; Wed, 05 Apr 2023 02:31:38 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:7011:a042:b0:33a:3071:f14a with HTTP; Wed, 5 Apr 2023 02:31:37 -0700 (PDT) From: Roland Che Date: Wed, 5 Apr 2023 05:31:37 -0400 Message-ID: Subject: invalid memory alloc request size Error To: pgsql-novice Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello All, I am having below error when our ANALYZE script runs. Our maintenance work_mem is set to 128M but when this analyze script is ran, the maintenance work_mem is set to session level at 2G but we are still getting the error on some table columns. ERROR: invalid memory alloc request size 8589934668. I saw a past dba had to disabled statistics by setting the statistics value to 0 meaning stats will not be updated on such table columns. He used these two commands to solve the error which kind of shows if queries use those columns, like it will be slow as stats will not be updated . ALTER COLUMN position SET STATISTICS 0; ALTER COLUMN position SET STORAGE EXTENDED; Please can anyone advise on how to go about this error? cpu 8 Ram 32 on that server. Regards Roland