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 1nAAai-0005Ps-Nu for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Jan 2022 13:01:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nAAah-0003BU-Jf for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Jan 2022 13:01:31 +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 1nAAah-0003BL-7s for pgsql-hackers@lists.postgresql.org; Wed, 19 Jan 2022 13:01:31 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nAAaf-00012r-2N for pgsql-hackers@postgresql.org; Wed, 19 Jan 2022 13:01:30 +0000 Received: by mail-ed1-x52f.google.com with SMTP id j23so5695436edp.5 for ; Wed, 19 Jan 2022 05:01:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=1SNK2rHfsAPdZWGYbnAKPhlsz+JI5hPeErKQS0I2Cr0=; b=dcuvdQDoEHb3OAGfLjtzxnIotLFWppa8mij0LVVWQou8sWk+rHimGiYQXYgWWIU2tG 60wovXa3ogjze50Vt5raYA2Y3rVWMgYswLtjxQQcr8H3lCWP7NV5oCu9S8WcrBUpeCZ1 pjElRm49M0mf2Fn8POQhlwi2w5HgFvD6p8GXZIFRX9mezBAZkYu5VA0Fj3UGNUOs1oC8 RyLs23eU1gzu5EniRBiKNm9MUcrjdH5eisQvBRRZJNAYPimLZsDpsl8aJmGAQzozrxWv dw2ixisfDZs6HR7rT5lKskeCT03BFtkat5pbzp/k3nE7gJYnYFl0Y04QWosO0XlWHTwN 7yAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=1SNK2rHfsAPdZWGYbnAKPhlsz+JI5hPeErKQS0I2Cr0=; b=6EMybk4+S+tcaVV6EvEqHbJPTfKb4pFT2toV2oMKjTovR66rVBPuRhTaFcLFxnJ9ti /DsuFhu1o+w970V9rK2DldPexgeeCMpiImPPKOnSy/H3gkIJ0/LHI1HxEhIO/SHIMIJt PH0EXVPD+IMsjNpZEH0Z1jtcBDcjBL1cyc8JJtHCPY5w9NbSXOBaQbmaxlumGdu+iDZx p13o/NjCltbZeoZMCfFb14bc6u3vRObob5YcqUtguxXFzaAW6NXPyGAnLBpSXIugoAv8 +t2mLvrTbcFq8iwxfZwTJukOfYFWSZnYLFzkevV59VnU7JQAsSdQbJJ31eBAsIPPTw7f c/lw== X-Gm-Message-State: AOAM5313isUtigEj9ZJj4zNRzhGGOZ/HshLM8nw7sv36h4Gh/lRwpNpj Qu+EQvSjkKJWDN7EWBCR4i8eTi5UQVZ29Q== X-Google-Smtp-Source: ABdhPJwyrJGbhlyk0O0bFy/N8dGyS837EA1uEvp6ryRTZZP6Tty6Et/6NZKnYSFqfVE2uMomCqeS/Q== X-Received: by 2002:a17:906:dc95:: with SMTP id cs21mr15178574ejc.709.1642597287769; Wed, 19 Jan 2022 05:01:27 -0800 (PST) Received: from smtpclient.apple (vpn-253-210.epfl.ch. [128.179.253.210]) by smtp.gmail.com with ESMTPSA id p15sm6351043ejc.156.2022.01.19.05.01.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Jan 2022 05:01:27 -0800 (PST) From: Kostas Chasialis Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Subject: [ERROR] Copy from CSV fails due to memory error. Message-Id: <21D3CCA3-328F-46AC-93CB-CDEBF81BD4F8@gmail.com> Date: Wed, 19 Jan 2022 15:01:25 +0200 To: pgsql-hackers@postgresql.org X-Mailer: Apple Mail (2.3693.20.0.1.32) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hey. I am facing an issue when I try to run the following command COPY FROM WITH DELIMITER E',=E2=80=99; This file, is rather large, it's around 178GBs.=20 When I try to run this COPY command I get the following error: ERROR: out of memory DETAIL: Failed on request of size 2048 in memory context = "AfterTriggerEvents". CONTEXT: COPY ssbm300_lineorder, line 50796791 Clearly a memory allocation function is failing but I have no clue how = to fix it. I have tried experimenting with shared_buffers value in postgresql.conf = file but after searching a bit I quickly realized that I do not know = what I am doing there so I left it with default value. Same with = work_mem value. Did you face this issue before? Can you help me resolve it? Thanks in advance!