Hi all,
I have a use case in postgresql where I have inserted 500 rows in a table with 2 columns as described below.
create table xyz (
id citext not null primary key,
col1 bytea
);
The table has 500 rows and each row has around 850 MB of data. The bytea column data in the row has around 830 to 840 MB of data while citext column data has 10 to to 15 bytes approximately.
When I try to fetch all rows with a select query or try to fetch a single row with a select statement using the where clause for this table, the Database throws the below error -
VERROR; invalid memory alloc request size 1764311653(File mcxt.c; Line 959;
Routine palloc; )
The error above pointing the PostgreSQL database backend code.
May I know why I am getting this error? If I use array fetch using the ODBC driver with fetchsize=1 (Assuming the application will fetch 1 record at a time from the PostgreSQL database server) then also I get that error. Is there any Server configuration which can control this memory allocation error and allow me to fetch one record at time from the PostgreSQL database table?
Please suggest if it is a known issue or limitation in postgresql backend code. If so please point to the documentation link for the same. If there is any workaround as well please update me.
Regards,
Jitesh