[BUGS] BUG #8494: Cannot Backup / Restore

2013-10-01 Thread ha
The following bug has been logged on the website:

Bug reference:  8494
Logged by:  Le Quan Ha
Email address:  h...@canwrx.com
PostgreSQL version: 9.2.0
Operating system:   Windows Server 2012
Description:

Dear PostgreSQL,


I would like to introduce myself: my name is Le Quan Ha, IT support of
Canwrx Group Ltd. Alberta, Canada
I installed on my Windows Server 2012 your PostgreSQL. 


a)  My version is Postgres Enterprise Manager version 3.0.0, copyright
2002-2012, the pgAdmin Development Team; and Postgres Plus Advanced Server
9.2  


b) The bug is: from the beginning of Installation, the Database Backup and
Restore menu options are always greyed out and disabled that I could not
back up my database. I also tried command-lines  pg_dump  and  psql  , both
command lines are NOT running


Therefore, I think that maybe the command-lines cannot execute hence Backup
and Restore menu options are always greyed out and disabled.


May you help me with this how to fix as our company database grows large now
into 4 thousand profiles, we need to back up urgently. 


I would like to appreciate your kindness,
Yours sincerely,
Le Quan Ha, 
IT support, 
Canwrx Group Ltd.


RSVP.




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


[BUGS] BUG #8495: PLSQL PG Terrible performance by using two-dimensional arrays.

2013-10-01 Thread m . manso
The following bug has been logged on the website:

Bug reference:  8495
Logged by:  Miguel A. Manso Callejo
Email address:  m.ma...@upm.es
PostgreSQL version: 9.1.9
Operating system:   Ubuntu 12.04LTS
Description:

I'm trying to random access to a 2-dimensional array of double precision
numbers. When range of the array increase, the performance decrease
quickly.
A simple function as:
CREATE OR REPLACE FUNCTION fill_2d_array( rows integer, cols integer)
RETURNS integer AS
$BODY$
DECLARE
img double precision[][];
i integer; j integer;
cont integer;
BEGIN
img  := ARRAY( SELECT 0 FROM generate_series(1, rows * cols) ) ; 
cont:= 0;
For i IN 1..rows LOOP
For j IN 1..cols LOOP
img[i * cols + j] := (i * cols + j)::double precision;
cont := cont + 1;
END LOOP;
END LOOP;
return cont;
END;
$BODY$
  LANGUAGE plpgsql;
ALTER FUNCTION fill_2d_array( integer, integer)
  OWNER TO postgres;  


when call the function with 700 rows & 1200 cols (explain (analyze,buffers)
select fill_2d_array(700,1200); ) the time consumed is about 50minutes.


What is bad? what i'm doing bad?


Thank you very much.



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #8495: PLSQL PG Terrible performance by using two-dimensional arrays.

2013-10-01 Thread Pavel Stehule
Hello


2013/10/1 

> The following bug has been logged on the website:
>
> Bug reference:  8495
> Logged by:  Miguel A. Manso Callejo
> Email address:  m.ma...@upm.es
> PostgreSQL version: 9.1.9
> Operating system:   Ubuntu 12.04LTS
> Description:
>
> I'm trying to random access to a 2-dimensional array of double precision
> numbers. When range of the array increase, the performance decrease
> quickly.
> A simple function as:
> CREATE OR REPLACE FUNCTION fill_2d_array( rows integer, cols integer)
> RETURNS integer AS
> $BODY$
> DECLARE
> img double precision[][];
> i integer; j integer;
> cont integer;
> BEGIN
> img  := ARRAY( SELECT 0 FROM generate_series(1, rows * cols) ) ;
> cont:= 0;
> For i IN 1..rows LOOP
> For j IN 1..cols LOOP
> img[i * cols + j] := (i * cols + j)::double precision;
> cont := cont + 1;
> END LOOP;
> END LOOP;
> return cont;
> END;
> $BODY$
>   LANGUAGE plpgsql;
> ALTER FUNCTION fill_2d_array( integer, integer)
>   OWNER TO postgres;
>
>
> when call the function with 700 rows & 1200 cols (explain (analyze,buffers)
> select fill_2d_array(700,1200); ) the time consumed is about 50minutes.
>
>
> What is bad? what i'm doing bad?
>

update a large array is terrible slow due fact, so PostgreSQL arrays are
immutable - so any update is same as copy of array.

sometimes is better to generate table and build a array from table, but it
is not possible for two dimensional array without custom C extension :(

if you can, try to use PLPerl instead PL/pgSQL

You cannot do much more - for 1D arrays exists some tricks, but it doesn't
work for 2D arrays. You can write relative simply C extension, and solve
problem there.

Regards

Pavel Stehule





>
>
> Thank you very much.
>
>
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>


Re: [BUGS] BUG #8494: Cannot Backup / Restore

2013-10-01 Thread Mark Kirkwood

On 01/10/13 15:17, h...@canwrx.com wrote:


a)  My version is Postgres Enterprise Manager version 3.0.0, copyright
2002-2012, the pgAdmin Development Team; and Postgres Plus Advanced Server
9.2



Hi - your product is supported by Enterprisedb 
(http://www.enterprisedb.com/). I think you would be better raising this 
issue with them!


Cheers

Mark


--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs