Discussion:
pg_dirtyread doesnt work
(too old to reply)
Alejandro Carrillo
2012-12-27 21:17:29 UTC
Permalink
Hi,

After of very tried to compile this PostgreSQL C function for Windows, I compile that (with VS C++ 2008), but the function get a error when try to read a deleted row. The example:

CREATE FUNCTION pg_dirtyread(oid)
RETURNS setof record
AS E'$libdir/pg_dirtyread', 'pg_finfo_pg_dirtyread' LANGUAGE C STRICT ;

Create table hola(
id bigserial,
dato1 varchar(199) not null,
fecha date
);


/*insert 3 rows and delete 1 row*/



select * from pg_dirtyread('hola'::regclass) t (id bigint,dato1 varchar(199), fecha date);

ERROR:  invalid memory alloc request size 1850015748

Anybody can help me?

Thanks
Alejandro Carrillo
2012-12-28 15:53:20 UTC
Permalink
Anybody knows why could be happening: ERROR:  invalid memory alloc request size 1850015748

Thanks
________________________________
Enviado: Jueves 27 de diciembre de 2012 16:17
Asunto: [GENERAL] pg_dirtyread doesnt work
Hi,
CREATE FUNCTION pg_dirtyread(oid)
RETURNS setof record
AS E'$libdir/pg_dirtyread', 'pg_finfo_pg_dirtyread' LANGUAGE C STRICT ;
Create table hola(
id bigserial,
dato1
varchar(199) not null,
fecha date
);
/*insert 3 rows and delete 1 row*/
select * from pg_dirtyread('hola'::regclass) t (id bigint,dato1 varchar(199), fecha date);
ERROR:  invalid memory alloc request size 1850015748
Anybody can help me?
Thanks
Phil Sorber
2012-12-28 19:11:58 UTC
Permalink
Most likely it's because of TOAST'd records. The module is pretty
naive and needs to be updated to handle such cases.
Anybody knows why could be happening: ERROR: invalid memory alloc request
size 1850015748
Thanks
________________________________
Enviado: Jueves 27 de diciembre de 2012 16:17
Asunto: [GENERAL] pg_dirtyread doesnt work
Hi,
After of very tried to compile this PostgreSQL C function for Windows, I
compile that (with VS C++ 2008), but the function get a error when try to
CREATE FUNCTION pg_dirtyread(oid)
RETURNS setof record
AS E'$libdir/pg_dirtyread', 'pg_finfo_pg_dirtyread' LANGUAGE C STRICT ;
Create table hola(
id bigserial,
dato1 varchar(199) not null,
fecha date
);
/*insert 3 rows and delete 1 row*/
select * from pg_dirtyread('hola'::regclass) t (id bigint,dato1 varchar(199), fecha date);
ERROR: invalid memory alloc request size 1850015748
Anybody can help me?
Thanks
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Alvaro Herrera
2012-12-28 20:10:07 UTC
Permalink
Post by Phil Sorber
Most likely it's because of TOAST'd records. The module is pretty
naive and needs to be updated to handle such cases.
It doesn't look like a column with this definition would be toasted,
Post by Phil Sorber
Post by Alejandro Carrillo
Create table hola(
id bigserial,
dato1 varchar(199) not null,
fecha date
);
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Alejandro Carrillo
2012-12-28 20:31:48 UTC
Permalink
So I going to say, Alvaro.
The table structure should not create a table with TOAST
________________________________
Enviado: Viernes 28 de diciembre de 2012 15:10
Asunto: Re: [GENERAL] pg_dirtyread doesnt work
Post by Phil Sorber
Most likely it's because of TOAST'd records. The module is pretty
naive and needs to be updated to handle such cases.
It doesn't look like a column with this definition would be toasted,
Post by Phil Sorber
Post by Alejandro Carrillo
Create table hola(
id bigserial,
dato1 varchar(199) not null,
fecha date
);
--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
http://www.postgresql.org/mailpref/pgsql-general
Loading...