Take the 2-minute tour ×
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. It's 100% free, no registration required.

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: http://forums.freebsd.org/showpost.php?p=64521&postcount=2 i.e.

kern.ipc.semmni=40
kern.ipc.semmns=240
kern.ipc.seumr=40
kern.ipc.semmnu=120

in /boot/loader.conf

When trying to populate one of my tables;

CREATE TABLE fb_user (
    id BIGINT NOT NULL,
    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.