Re: [GENERAL] wal archiving on a hot-standby server

2011-11-22 Thread Enrico Sirola
Hello John, Il giorno 22/nov/2011, alle ore 11.04, John R Pierce ha scritto: > I don't believe that function is immutable, since it depends on the value of > pg_current_xlog_location() which will change over time. oops, I'm afraid you are right! e. -- Sent via pgsql-general mailing list (pgs

Re: [GENERAL] wal archiving on a hot-standby server

2011-11-22 Thread enrico . sirola
This message has been digitally signed by the sender. Re___GENERAL__wal_archiving_on_a_hot_standby_server.eml Description: Binary data - Hi-Tech Gears Ltd, Gurgaon, India -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to y

Re: [GENERAL] wal archiving on a hot-standby server

2011-11-22 Thread Enrico Sirola
Hello Simon, Il giorno 21/nov/2011, alle ore 15.47, Simon Riggs ha scritto: > On Mon, Nov 21, 2011 at 10:58 AM, Enrico Sirola > wrote: > >> is it possible to archive the WAL files received by a hot-standby server? In >> noticed nothing about this on the pgsql docs. T

[GENERAL] wal archiving on a hot-standby server

2011-11-21 Thread Enrico Sirola
Hello, is it possible to archive the WAL files received by a hot-standby server? In noticed nothing about this on the pgsql docs. The idea is to archive logs in two locations, at the primary site and at the replica site (over a wan) in order to be able to perform a PITR also at the replica site.

Re: [GENERAL] weird pg_statistic problem

2011-11-12 Thread Enrico Sirola
Hello Tom, Il giorno 11/nov/2011, alle ore 22.05, Tom Lane ha scritto: > Enrico Sirola writes: >> this morning I experienced a weird problem with our pgsql database (9.0.3): >> while performing a simple query, I receive the following error: >> Nov 11 10:24:09 postgre

[GENERAL] weird pg_statistic problem

2011-11-11 Thread Enrico Sirola
Hello, this morning I experienced a weird problem with our pgsql database (9.0.3): while performing a simple query, I receive the following error: Nov 11 10:24:09 postgres[23395]: [7-1] ERROR: missing chunk number 0 for toast value 550556127 in pg_toast_2619 so I tried to find which relation

[GENERAL] db_restore and xml data

2009-02-27 Thread Enrico Sirola
Hello, I have a pgsql database hosting xml data in xml columns. The data, have declarations at the beginning, so it is saved with XMLPARSE (DOCUMENT ) when I try to restore a database from dump, pg_restore complains because the data it tries to restore is not an xml content (correctly),

[GENERAL] when to use "execute" in plpgsql?

2009-02-27 Thread Enrico Sirola
Hello, I'm having some troubles with the correct use of the execute plpgsql statement. Where I work, we have a postgresql db hosting a set of schemas all with the same tables and, from time to time, we upgrade the schemas to a new version coding a stored procedure like the following (pseu

Re: [GENERAL] unable to drop a constraint

2008-07-17 Thread Enrico Sirola
Hi Michael, Il giorno 16/lug/08, alle ore 18:21, Michael Glaesemann ha scritto: On 2008-07-16, at 7:18 AM, Enrico Sirola wrote: Hi, I'm using postgresql version 8.3.1 I have two tables, one has a field with a foreign key pointing to the primary key of another table. When I to dro

Re: [GENERAL] unable to drop a constraint

2008-07-17 Thread Enrico Sirola
Hello Tom, Il giorno 16/lug/08, alle ore 16:40, Tom Lane ha scritto: Enrico Sirola <[EMAIL PROTECTED]> writes: I have two tables, one has a field with a foreign key pointing to the primary key of another table. When I to drop the first table, I get the following error: test=# drop

[GENERAL] unable to drop a constraint

2008-07-16 Thread Enrico Sirola
Hi, I'm using postgresql version 8.3.1 I have two tables, one has a field with a foreign key pointing to the primary key of another table. When I to drop the first table, I get the following error: test=# drop table user; ERROR: "customer_pkey" is an index test=# select * from pg_constra

[GENERAL] pgbench not setting scale size correctly?

2008-03-14 Thread Enrico Sirola
Hello, I'm trying to perform some benchmarks using pgbench. I'm using the following rpm package: postgresql-contrib-8.3.0-2PGDG.rhel5 for x86_64, downloaded from the pgsql yum repository for centos5/amd64. When I init the pgbench database, the scale factor seems to work, however when perfor

Re: [GENERAL] APEX / HTML DB for PostgreSQL

2008-02-25 Thread Enrico Sirola
Il giorno 24/feb/08, alle ore 04:53, justin tocci ha scritto: In its most basic form a great tool would just start as a pl/pgsql or pl/perl function that could be used to call a table and have it output a batch of records to an editable html form or a colored pdf for nice reports. There wo

Re: [GENERAL] questions about very large table and partitioning

2008-02-18 Thread Enrico Sirola
Il giorno 18/feb/08, alle ore 18:42, Erik Jones ha scritto: On Feb 18, 2008, at 11:23 AM, Enrico Sirola wrote: Il giorno 18/feb/08, alle ore 17:37, [EMAIL PROTECTED] ha scritto: 1) PostgreSQL only support partition by inheritance, and rules have to be created for each child table, this

Re: [GENERAL] questions about very large table and partitioning

2008-02-18 Thread Enrico Sirola
Il giorno 18/feb/08, alle ore 17:37, [EMAIL PROTECTED] ha scritto: 1) PostgreSQL only support partition by inheritance, and rules have to be created for each child table, this will result *a lot of* rules if the number of child tables is large. Are there some smart ways to avoid this kind of ma

Re: [GENERAL] Vertical and Horizontal Table Partition

2008-02-18 Thread Enrico Sirola
inheritance + triggers probably. there's an example on the pgsql documentation Il giorno 18/feb/08, alle ore 13:18, T.J. Adami ha scritto: I know that using tablespaces I can create a vertical partition by creating two tables with the same primary key wich stores different columns in each tab

Re: [GENERAL] arrays of floating point numbers / linear algebra operations into the DB

2008-02-03 Thread Enrico Sirola
I respond myself: Enrico Sirola ha scritto: [...] seems to work). The problem for the code above is that it doesn't work for vectors longer than 1000 elements or so (try it with 2000 and it doesn't work). I guess I should manage the "toasting" machinery in some ways

Re: [GENERAL] arrays of floating point numbers / linear algebra operations into the DB

2008-02-03 Thread Enrico Sirola
Hi Webb, Webb Sprague ha scritto: I'm quite proud, this is my first C extension function ;-) I'd gladly post the code if it's ok for the list users. It's more or less 100 lines of code. This approach seems promising... I would definitely like to see it. here it goes: ---

Re: [GENERAL] arrays of floating point numbers / linear algebra operations into the DB

2008-02-02 Thread Enrico Sirola
Hi Webb, Joe, Martijn Webb Sprague ha scritto: On Feb 1, 2008 2:31 AM, Enrico Sirola <[EMAIL PROTECTED]> wrote: Hello, I'd like to perform linear algebra operations on float4/8 arrays Having avoided a bunch of real work wondering about linear algebra and PG, did you consi

Re: [GENERAL] arrays of floating point numbers / linear algebra operations into the DB

2008-02-01 Thread Enrico Sirola
Hi Joe, I don't know if the speed will meet your needs, but you might test to see if PL/R will work for you: http://www.joeconway.com/plr/ You could use pg.spi.exec() from within the R procedure to grab the arrays, do all of your processing inside R (which uses whatever BLAS you've set

Re: [GENERAL] arrays of floating point numbers / linear algebra operations into the DB

2008-02-01 Thread Enrico Sirola
Hi Colin, Il giorno 01/feb/08, alle ore 15:22, Colin Wetherbee ha scritto: I'm not sure about the internals of PostgreSQL (eg. the Datum object(?) you mention), but if you're just scaling vectors, consecutive memory addresses shouldn't be absolutely necessary. Add and multiply operations

[GENERAL] arrays of floating point numbers / linear algebra operations into the DB

2008-02-01 Thread Enrico Sirola
Hello, I'd like to perform linear algebra operations on float4/8 arrays. These tasks are tipically carried on using ad hoc optimized libraries (e.g. BLAS). In order to do this, I studied a bit how arrays are stored internally by the DB: from what I understood, arrays are basically a vector

Re: [GENERAL] Oracle Analytical Functions

2008-01-31 Thread Enrico Sirola
Hi Adam, Il giorno 31/gen/08, alle ore 16:13, Adam Rich ha scritto: I'm trying to replicate the use of Oracle's 'lag' and 'over partition by' analytical functions in my query. I have a table (all_client_times) such as: and I would like to create a new view that takes the first table and calcul

Re: [GENERAL] Oracle Analytical Functions

2008-01-31 Thread Enrico Sirola
Hi Willem, Il giorno 30/gen/08, alle ore 22:15, Willem Buitendyk ha scritto: I'm trying to replicate the use of Oracle's 'lag' and 'over partition by' analytical functions in my query. I have a table (all_client_times) such as: client_id, datetime 122, 2007-05-01 12:00:00 122, 2007-05-01

[GENERAL] on delete rules returned rowcount

2008-01-25 Thread Enrico Sirola
Hi, short summary of the problem follows :) I'm writing an on delete rule for a view and I need to set the status message (DELETE XXX) for number of deleted tuples. Is it possible? A brief, working use case follows: I have a view restricting the access to a table, as the following: create

Re: [GENERAL] pgsql constraints and temporal tables

2007-12-14 Thread Enrico Sirola
Hi Tom! Tom Lane ha scritto: > Enrico Sirola <[EMAIL PROTECTED]> writes: >> However, I'm facing a problem I'm not able to solve with postgresql: >> usually updating or deleting time-varying data means to temporary >> violate a constraint in a transaction b

[GENERAL] pgsql constraints and temporal tables

2007-12-14 Thread Enrico Sirola
Hello, I'm reading "Developing Time-Oriented Database Applications in SQL" by Richard Snodgrass, and trying to reimplement some of the examples using postgresql. The book is about temporal tables and applications involving time-varying data; the one of the main difficulties with such problems is th

[GENERAL] index organized tables use case

2007-12-12 Thread Enrico Sirola
Hello, I'm thinking about migrating from another DBMS to postgresql. I have an almost working proof of concept, but still have some doubts about the following use case. I have a table like the following CREATE TABLE test ( code character varying(32) NOT NULL, tag integer NOT NULL, value dou

[GENERAL] 8.3, a few questions

2007-12-03 Thread Enrico Sirola
Dear all, I'd like to use the upcoming release 8.3 for my next project. When is it expected to be finalized? My deadline is 2nd quarter 2008, do you think there is a chance for me to use it? A second question (more technical). Is it possible to put an index on an xpath expression of an XML ty

Re: [GENERAL] COPY to/from non-local file

2007-06-27 Thread Enrico Sirola
ys of the postgresql system user and you are done. You can transfer files without the need for a password, and it's perfectly scriptable I hope it helps, Enrico Sirola [EMAIL PROTECTED]

[GENERAL] copying indexes and f.keys from a template table

2007-06-20 Thread Enrico Sirola
g. using a placeholder for the table name) or maybe one could use the information on Primary/foreign keys and indexes present also in the system tables so I guess one should be able to use it to build the PK/FKs and indexes on the partition tables. Any advice? Thanks in advance, Enrico Sir

Re: [GENERAL] table partitioning pl/pgsql helpers

2007-06-04 Thread Enrico Sirola
ts of copy from). Thanks for the advices, Enrico Sirola [EMAIL PROTECTED]

Re: [GENERAL] [HACKERS] table partitioning pl/pgsql helpers

2007-06-04 Thread Enrico Sirola
Il giorno 02/giu/07, alle ore 00:53, Jim Nasby ha scritto: Dropping -hackers; that list is for development of the database engine itself. ok, sorry e. ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://w

[GENERAL] table partitioning pl/pgsql helpers

2007-05-30 Thread Enrico Sirola
child_table_name is not a table name. If, on the other side, I dynamically create the query like in execute 'insert into ' || child_table_name || ' values (NEW.*)'; it complains because NEW in the execution context is unknown. This should be a rather common problem... Isn't it? Is there a canonical way to solve it? Maybe there's a trivial answer, but I have no plpgsql programming experience. Thanks a lot in advance, Enrico Sirola [EMAIL PROTECTED]