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 1nnKs4-0005Zn-JB for pgsql-sql@arkaria.postgresql.org; Sat, 07 May 2022 13:53:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nnKs2-00080s-5W for pgsql-sql@arkaria.postgresql.org; Sat, 07 May 2022 13:53:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nnKs1-00080j-RV for pgsql-sql@lists.postgresql.org; Sat, 07 May 2022 13:53:17 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nnKrz-0004TR-Gj for pgsql-sql@lists.postgresql.org; Sat, 07 May 2022 13:53:16 +0000 Received: by mail-pf1-x42b.google.com with SMTP id i24so8518906pfa.7 for ; Sat, 07 May 2022 06:53:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to; bh=FSJUgmqLuwnbpwuWfqOEe2tkL47+YCJFuxbe4xhFVjc=; b=HJ3vTD9wtkYOWRZGxHfdfPl6lbs0RSuMifSlTlu8rlt3PQHHUppIZ3ercLPAts3kZz xnUO/DMxEVYwq0ADgxpKIDOJ0hrbUeqE3MZzeC3320qBkDSXBdPKQrVEpXIeeI/O81O3 FhZRtjjM2nq72uhfBHH6KP0UpyvKm7+Vmkh0FuY+oa3ifR5hVSJydUt/LFTlm7m3IxNT KMbml6Sc4iMN2UZ0VPVTqmWpIoytSSmYB32Z6kfwMOirKj/ZYtHcEnTjH4OoS0rBVv9r qb8ntC2FH59b98RVjppCa5XrGTQkah/LmMa484xKZ6iT+KYUYeUdTz7JVfH5IpAbpLWX Ejiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to; bh=FSJUgmqLuwnbpwuWfqOEe2tkL47+YCJFuxbe4xhFVjc=; b=lEpGpt90fzXPrEosuQgQefMt6c9r06BPrHYeGhgRobF0aMF8Ygs7ez3+CmBl6cjKsZ FogEzS66uiPNeChEyFneqfbiuP8eudskMWt+Lciy7iyvwl6WZSecbn+xxa0KTtDZm8Dj Avgec9J2b2WXy2hSoNDJmB9KyT/d1J4Nq5zByhxknnJxoQGXcBqaLOx/UAOHtd7Q+T5t M5rENovLJIJvh2WUnpm+DuCHvjJd1fT1YXRDjh4AqgQnbkCJoofz2zi/nDZLGJ438YcS QX01z/mlpxuSU2v1z81D+nbkIWZuJFVm/7dYrSU/ISJ+CIG2HRIYMkiegDk8EQ9kPKqj FQ+A== X-Gm-Message-State: AOAM533pf8RtgILxMR4jIw5fZId8STKKJyhaC//80mgl4W1jPfg0zdwX bOL/tBFQTxe9I71ftu1mLjFuw4gpI50= X-Google-Smtp-Source: ABdhPJzEHSoNeQU1uG94GP05tl/vRpRb1gTasnCebzkyP1mPMrcF9b1WPE1YA4hJpjnua4xyfQt2jQ== X-Received: by 2002:a65:410a:0:b0:399:38b9:8ba with SMTP id w10-20020a65410a000000b0039938b908bamr6535137pgp.526.1651931593803; Sat, 07 May 2022 06:53:13 -0700 (PDT) Received: from [192.168.1.3] (c-71-195-204-99.hsd1.ut.comcast.net. [71.195.204.99]) by smtp.gmail.com with ESMTPSA id s3-20020a170902c64300b0015e8d4eb277sm3642593pls.193.2022.05.07.06.53.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 07 May 2022 06:53:13 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------ytxvr6eQHZyvbj8FfFAAFPgS" Message-ID: <014bdb01-07d9-1d03-24a1-2588dec64843@gmail.com> Date: Sat, 7 May 2022 07:53:11 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: Recursive query - ERROR: invalid memory alloc request size 1073741824 Content-Language: en-CA To: pgsql-sql@lists.postgresql.org References: From: Rob Sargent In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------ytxvr6eQHZyvbj8FfFAAFPgS Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/7/22 07:23, Shaozhong SHI wrote: > There is a loop of recursive query.  It runs at a point where it stops. > > This error turned up.- ERROR:  invalid memory alloc request size > 1,073,741,824 > > Can anyone provide pointers how to solve this problem or work around? > > Regards, > > David Quite difficult without any code snippet (or even which language) but you've requested a single block of memory that is larger than the maximum allowed. That number (1,073,741,824) is 2^30 . --------------ytxvr6eQHZyvbj8FfFAAFPgS Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 5/7/22 07:23, Shaozhong SHI wrote:
There is a loop of recursive query.  It runs at a point where it stops.

This error turned up.- ERROR:  invalid memory alloc request size 1,073,741,824

Can anyone provide pointers how to solve this problem or work around?

Regards,

David
Quite difficult without any code snippet (or even which language) but you've requested a single block of memory that is larger than the maximum allowed.  That number (1,073,741,824) is 230
--------------ytxvr6eQHZyvbj8FfFAAFPgS--