Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running a postgreSQL 9.2.1 installation in a FreeBSD 9.0 Jail with default settings.

I've configured loader.conf according to this post: i.e.


in /boot/loader.conf

When trying to populate one of my tables;

CREATE TABLE fb_user (
    name TEXT,
    category VARCHAR(100));

With \COPY fb_user(id, name, category) from 'fb_user.csv' with delimiter ',' CSV quote '"';

It runs for a few seconds and then prints:

ERROR:  out of memory
DETAIL:  Cannot enlarge string buffer containing 1073741800 bytes by 40 more bytes.
CONTEXT:  COPY fb_user, line 1

Yes, fb_user.csv is quite large (1.6G and 47'361'855 lines) but should not the \copy function handle that?

share|improve this question

closed as off-topic by Aaron Bertrand Sep 4 '13 at 13:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Aaron Bertrand
If this question can be reworded to fit the rules in the help center, please edit the question.

Think I found the error.. My csv had run away lines, trying to fix that and see if it works better. – Fredrik Erlandsson Nov 1 '12 at 18:18

Browse other questions tagged or ask your own question.