"Thilo Hille" <thilo(at)resourcery(dot)de> writes:
> this query...:
> my $tsql = qq{ insert into user_month (select '$currentmonth'::date as
> month,'*nopleid*',count(distinct uuid) from user_log where day<=now()::date
> and day>(now()-interval '30 days')::date) };
> my $tsth = $tdbh->prepare( $tsql );
> $tsth->execute();
> sometimes drops this error:
> DBD::Pg::st execute failed: ERROR: MemoryContextAlloc: invalid request size
> 1969649011
This looks to me like a corrupted-data issue --- specifically, the
length word of some data value in the table has gotten clobbered and
now appears ridiculously large.
You should try to determine exactly which row(s) contain bad data.
regards, tom lane