BUG #4095: Out of memory when restore db

From: "Pavel Zaitsev" <pz(at)mail(dot)ru>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4095: Out of memory when restore db
Date: 2008-04-06 11:04:46
Message-ID: 200804061104.m36B4ktY057654@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 4095
Logged by: Pavel Zaitsev
Email address: pz(at)mail(dot)ru
PostgreSQL version: 8.2.4
Operating system: Windows 2003 Server SP1
Description: Out of memory when restore db
Details:

I made the backup of database named avtopzipbuh:
pg_dump -f%DRIVETO%\Backup\%DIRNAME%\%FILENAME% -Upostgres avtozipbuh
then, I tried to restore it:
psql -davtozipbuh -Upostgres -fF:\Backup\avtozipbuh
-oF:\Backup\logrestore.txt
but I had an error
"psql:F:/Backup/avtozipbuh:214116: ERROR: out of memory
DETAIL: Failed on request of size 536870912.
CONTEXT: COPY config, line 6800"
here is the log:

TopMemoryContext: 49152 total in 5 blocks; 9504 free (22 chunks); 39648
used
TopTransactionContext: 8192 total in 1 blocks; 7336 free (0 chunks); 856
used
CFuncHash: 8192 total in 1 blocks; 4936 free (0 chunks); 3256 used
Rendezvous variable hash: 8192 total in 1 blocks; 3848 free (0 chunks); 4344
used
PLpgSQL function cache: 8192 total in 1 blocks; 5904 free (0 chunks); 2288
used
MessageContext: 8192 total in 1 blocks; 6952 free (1 chunks); 1240 used
Operator class cache: 8192 total in 1 blocks; 4872 free (0 chunks); 3320
used
smgr relation table: 24576 total in 2 blocks; 6792 free (4 chunks); 17784
used
TransactionAbortContext: 32768 total in 1 blocks; 32752 free (0 chunks); 16
used
Portal hash: 8192 total in 1 blocks; 3912 free (0 chunks); 4280 used
PortalMemory: 8192 total in 1 blocks; 8040 free (0 chunks); 152 used
PortalHeapMemory: 536976464 total in 8 blocks; 30496 free (24 chunks);
536945968 used
ExecutorState: 8192 total in 1 blocks; 7928 free (0 chunks); 264 used
ExprContext: 8192 total in 1 blocks; 8176 free (0 chunks); 16 used
Relcache by OID: 57344 total in 3 blocks; 30680 free (4 chunks); 26664 used
CacheMemoryContext: 4329016 total in 22 blocks; 673640 free (8 chunks);
3655376 used
pg_toast_1406616_index: 1024 total in 1 blocks; 288 free (0 chunks); 736
used
pg_class_relname_nsp_index: 1024 total in 1 blocks; 288 free (0 chunks); 736
used
pg_index_indrelid_index: 1024 total in 1 blocks; 352 free (0 chunks); 672
used
pg_attribute_relid_attnam_index: 1024 total in 1 blocks; 288 free (0
chunks); 736 used
pg_type_oid_index: 1024 total in 1 blocks; 352 free (0 chunks); 672 used
pg_cast_oid_index: 1024 total in 1 blocks; 352 free (0 chunks); 672 used
pg_shdepend_depender_index: 1024 total in 1 blocks; 216 free (0 chunks); 808
used
pg_shdepend_reference_index: 1024 total in 1 blocks; 288 free (0 chunks);
736 used
pg_depend_depender_index: 1024 total in 1 blocks; 216 free (0 chunks); 808
used
pg_depend_reference_index: 1024 total in 1 blocks; 216 free (0 chunks); 808
used
pg_description_o_c_o_index: 1024 total in 1 blocks; 216 free (0 chunks); 808
used
pg_type_typname_nsp_index: 1024 total in 1 blocks; 288 free (0 chunks); 736
used
pg_statistic_relid_att_index: 1024 total in 1 blocks; 328 free (0 chunks);
696 used
pg_proc_oid_index: 1024 total in 1 blocks; 352 free (0 chunks); 672 used
pg_proc_proname_args_nsp_index: 1024 total in 1 blocks; 216 free (0 chunks);
808 used
pg_operator_oprname_l_r_n_index: 1024 total in 1 blocks; 152 free (0
chunks); 872 used
pg_namespace_oid_index: 1024 total in 1 blocks; 392 free (0 chunks); 632
used
pg_namespace_nspname_index: 1024 total in 1 blocks; 352 free (0 chunks); 672
used
pg_language_oid_index: 1024 total in 1 blocks; 392 free (0 chunks); 632
used
pg_language_name_index: 1024 total in 1 blocks; 352 free (0 chunks); 672
used
pg_inherits_relid_seqno_index: 1024 total in 1 blocks; 328 free (0 chunks);
696 used
pg_database_oid_index: 1024 total in 1 blocks; 352 free (0 chunks); 672
used
pg_conversion_oid_index: 1024 total in 1 blocks; 392 free (0 chunks); 632
used
pg_conversion_name_nsp_index: 1024 total in 1 blocks; 328 free (0 chunks);
696 used
pg_conversion_default_index: 1024 total in 1 blocks; 192 free (0 chunks);
832 used
pg_opclass_oid_index: 1024 total in 1 blocks; 352 free (0 chunks); 672 used
pg_opclass_am_name_nsp_index: 1024 total in 1 blocks; 216 free (0 chunks);
808 used
pg_cast_source_target_index: 1024 total in 1 blocks; 288 free (0 chunks);
736 used
pg_authid_oid_index: 1024 total in 1 blocks; 352 free (0 chunks); 672 used
pg_authid_rolname_index: 1024 total in 1 blocks; 352 free (0 chunks); 672
used
pg_auth_members_role_member_index: 1024 total in 1 blocks; 328 free (0
chunks); 696 used
pg_auth_members_member_role_index: 1024 total in 1 blocks; 328 free (0
chunks); 696 used
pg_amop_opr_opc_index: 1024 total in 1 blocks; 288 free (0 chunks); 736
used
pg_aggregate_fnoid_index: 1024 total in 1 blocks; 352 free (0 chunks); 672
used
pg_trigger_tgrelid_tgname_index: 1024 total in 1 blocks; 288 free (0
chunks); 736 used
pg_rewrite_rel_rulename_index: 1024 total in 1 blocks; 328 free (0 chunks);
696 used
pg_operator_oid_index: 1024 total in 1 blocks; 352 free (0 chunks); 672
used
pg_amproc_opc_proc_index: 1024 total in 1 blocks; 216 free (0 chunks); 808
used
pg_amop_opc_strat_index: 1024 total in 1 blocks; 216 free (0 chunks); 808
used
pg_index_indexrelid_index: 1024 total in 1 blocks; 352 free (0 chunks); 672
used
pg_attribute_relid_attnum_index: 1024 total in 1 blocks; 288 free (0
chunks); 736 used
pg_class_oid_index: 1024 total in 1 blocks; 352 free (0 chunks); 672 used
MdSmgr: 24576 total in 2 blocks; 13936 free (1 chunks); 10640 used
LOCALLOCK hash: 8192 total in 1 blocks; 3912 free (0 chunks); 4280 used
Timezones: 49432 total in 2 blocks; 5968 free (0 chunks); 43464 used
ErrorContext: 8192 total in 1 blocks; 8176 free (0 chunks); 16 used
2008-04-05 20:28:16 ERROR: 53200: out of memory
2008-04-05 20:28:16 DETAIL: Failed on request of size 536870912.
2008-04-05 20:28:16 CONTEXT: COPY config, line 6800
2008-04-05 20:28:16 LOCATION: AllocSetRealloc, aset.c:907
2008-04-05 20:28:16 STATEMENT: COPY config (filename, creation, modified,
attributes, datasize, binarydata) FROM stdin;

===============

some parameters of my postgresql.conf
shared_buffers = 256MB
work_mem = 128MB
maintenance_work_mem = 16MB (tried change to 700Mb, no effect)

my system have 4Gb RAM, size of db approx 700mb. I have another db on this
system, its size 15Gb and I have no problem with it (dump\restore - ok)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Meskes 2008-04-06 14:29:05 Re: BUG #4090: ECPG Selecting table with NULL values
Previous Message Tom Lane 2008-04-05 15:26:46 Re: BUG #4092: initdb fails if the xlog directory is the same as [pg_data]/pg_xlog