Re: [GENERAL] New DB-design - help and documentation pointers appreciated

2010-07-02 Thread Craig Ringer
On 03/07/10 02:43, Rikard Bosnjakovic wrote: > However, the table that really makes me cringe in fear of un-knowledge > is this one: parameters. A parameter for a component can be something > that tells the designer that it must exceed a specific amount of > voltage. It's also got a unit. For exam

Re: [GENERAL] ERROR: canceling statement due to statement timeout

2010-07-02 Thread Craig Ringer
On 03/07/10 00:22, Tim wrote: > Hi, > > I've had a website up for a couple of months and it's starting to get > these db timeouts as traffic has increased to say 1k pageviews a day. Take note of which queries are timing out. You might need to enable some more logging in your app or the db to find

Re: [GENERAL] DBI::Oracle problems

2010-07-02 Thread Howard Rogers
Just thought I'd write back to say that (I think!) it had nothing to do with the software version, and everything to do with me knowing more about Oracle than PostgreSQL! I had not been sure how to get PostgreSQL to re-start every time the server bounced, so I followed the advice I'd seen in a num

Re: [GENERAL] C-Functions using SPI - Missing Magic Block

2010-07-02 Thread Craig Ringer
On 02/07/10 21:26, saitenhe...@web.de wrote: > #ifdef PG_MODULE_MAGIC > PG_MODULE_MAGIC; > #endif Why the conditional compilation of PG_MODULE_MAGIC? > ERROR: incompatible library "G:/PostgreSQL/8.3/lib/pgExampleSPI.dll": > missing magic block > TIP: Extension libraries are required to use the

Re: [GENERAL] Autovacuum and pg_largeobject

2010-07-02 Thread Alvaro Herrera
Excerpts from Norberto Delle's message of vie jul 02 13:43:37 -0400 2010: > As far as I know, It's not being locked. We use it to store digitalized > documents > and it's getting very big. I think the server is being turned off before > it can complete > an vacuum pass. The server is not kept on

[GENERAL] Need Windows 2008 support and old installer kind

2010-07-02 Thread Jose Torres
I have PostgreSql 8.2.3 I need Windows 2008 Server support. What version do you recommend which windows installer is the same kind as version 8.2.3? And where do I download it?

Re: [GENERAL] Help with pgAndroid Contest

2010-07-02 Thread Stephen Denne
Many thanks for the feedback. I'll look into the problem after installing. My first suspicion is that it is due to not having had preferences set. I agree about jdbc settings, I was rushing to get it out for some testing. Likewise the menu, though that is also due to developing using the emulator,

[GENERAL] Half-applied UPDATE rule on view

2010-07-02 Thread A.M.
Hello, I have encountered an odd behavior involving rules which the following script demonstrates (in postgresql 8.4.3). Note that at the end of the run, the "dud" table contains one row "spam1" when the update rule clearly contains two inserts to the "dud" table. It seems that the update rule

Re: [GENERAL] Help with pgAndroid Contest

2010-07-02 Thread Josh Kupershmidt
I tried it on my T-Mobile G1, stock 1.6 Android firmware. It downloaded and installed fine, but right after installation, I clicked to open and got an error box saying "... has encountered an unexpected error and closed". But pgQuilt did install successfully, and when I go to my menu of applicat

Re: [GENERAL] pgpool-II (max_pool and num_init_children)

2010-07-02 Thread Geoffrey
Guillaume Lelarge wrote: Le 02/07/2010 15:46, Geoffrey a écrit : Tatsuo Ishii wrote: I'm trying to get a handle on sane values for these two parameters. I assume that they should somehow correlate to my existing max_connections in my postgresql.conf file. Anyone using pgpool-II care to comme

Re: [GENERAL] bulk insert using COPY and PHP code

2010-07-02 Thread Scott Marlowe
On Fri, Jul 2, 2010 at 1:28 PM, Babu R wrote: > > Hi Pavel, > > Thanks. > > The situation is, I have the DB class which will return the connection object > that is created using the PDO class. And am using that object to perform the > db operations. ie: $DB->prepare("") > > Further I have the da

[GENERAL] New DB-design - help and documentation pointers appreciated

2010-07-02 Thread Rikard Bosnjakovic
Greetings. I'm on the verge designing a new database for electrical components, and I am in need of help. I have designed 3-4 small databases earlier, but these suffer from bad design and I cannot afford bad design for this database (which I surmise will be the biggest I will ever create). My olde

[GENERAL] CFP for Surge Scalability Conference 2010

2010-07-02 Thread Jason Dixon
A quick reminder that there's one week left to submit your abstract for this year's Surge Scalability Conference. The event is taking place on Sept 30 and Oct 1, 2010 in Baltimore, MD. Surge focuses on case studies that address production failures and the re-engineering efforts that led to victor

Re: [GENERAL] Autovacuum and pg_largeobject

2010-07-02 Thread Norberto Delle
Em 2/7/2010 13:57, Alvaro Herrera escreveu: Excerpts from Norberto Delle's message of vie jul 02 08:10:44 -0400 2010: Hi all I would like to know if the large object table pg_largeobject is routinely checked by the autovacuum daemon. I ask about this because I have a database in wich the pg

Re: [GENERAL] bulk insert using COPY and PHP code

2010-07-02 Thread Pavel Stehule
2010/7/2 Babu R > > Hi Pavel, > > Thanks. > > The situation is, I have the DB class which will return the connection object > that is created using the PDO class. And am using that object to perform the > db operations. ie: $DB->prepare("") > > Further I have the data in a CSV file which has to

Re: [GENERAL] bulk insert using COPY and PHP code

2010-07-02 Thread Babu R
Hi Pavel, Thanks. The situation is, I have the DB class which will return the connection object that is created using the PDO class. And am using that object to perform the db operations. ie: $DB->prepare("") Further I have the data in a CSV file which has to be inserted into the table. Here

Re: [GENERAL] Autovacuum and pg_largeobject

2010-07-02 Thread Alvaro Herrera
Excerpts from Norberto Delle's message of vie jul 02 08:10:44 -0400 2010: > Hi all > > I would like to know if the large object table pg_largeobject is > routinely checked by the autovacuum daemon. > I ask about this because I have a database in wich the pg_largeobject > table is being forcibly

[GENERAL] ERROR: canceling statement due to statement timeout

2010-07-02 Thread Tim
Hi, I've had a website up for a couple of months and it's starting to get these db timeouts as traffic has increased to say 1k pageviews a day. It uses django with the gis stuff to find distances from user to object and it's hosted on webfaction. I've asked webfaction about it and they say no one

Re: [GENERAL] C-functions using SPI Missing Magic Block Error

2010-07-02 Thread Saitenheini
I'll try b) and hope I can find a solution. Thanks for your support Joe. Kind Regards, Max. >On 07/02/2010 08:36 AM, saitenhe...@web.de wrote: >> Thanks, I've already tried that. I doesn't make any difference. Still the >> same error. >> >> in Visual C++ I can't even compile it, although I se

Re: [GENERAL] C-functions using SPI Missing Magic Block Error

2010-07-02 Thread Joe Conway
On 07/02/2010 08:36 AM, saitenhe...@web.de wrote: > Thanks, I've already tried that. I doesn't make any difference. Still the > same error. > > in Visual C++ I can't even compile it, although I set all links and > compiler directories like it was told in this post: > http://www.postgresql.org/

Re: [GENERAL] C-functions using SPI Missing Magic Block Error

2010-07-02 Thread Saitenheini
Thanks, I've already tried that. I doesn't make any difference. Still the same error. in Visual C++ I can't even compile it, although I set all links and compiler directories like it was told in this post: http://www.postgresql.org/docs/8.2/interactive/xfunc-c.html I don't have more ideas. Wh

Re: [GENERAL] Scheduling backup

2010-07-02 Thread Chris Browne
passionate_program...@hotmail.com (RP Khare) writes: > Is there any way to schedule PGSQL databases backups?  I want to > take hourly dumps of my production database. Sure. You can use whatever tool you already have to schedule running "pg_dump." On Unix-like systems, you almost always have a sy

Re: [GENERAL] C-functions using SPI Missing Magic Block Error

2010-07-02 Thread Joe Conway
On 07/02/2010 08:13 AM, saitenhe...@web.de wrote: > Thanks for reply Tom! > > I've tried several version: > > #define _USE_32BIT_TIME_T > > #include "postgres.h" > #include "fmgr.h" > #include "executor\spi.h" > > /* > #ifdef PG_MODULE_MAGIC > PG_MODULE_MAGIC; > #endif > */ > but still the sam

Re: [GENERAL] C-functions using SPI Missing Magic Block Error

2010-07-02 Thread Saitenheini
Thanks for reply Tom! I've tried several version: #define _USE_32BIT_TIME_T #include "postgres.h" #include "fmgr.h" #include "executor\spi.h" /* #ifdef PG_MODULE_MAGIC PG_MODULE_MAGIC; #endif */ extern Datum count_person (PG_FUNCTION_ARGS); PG_FUNCTION_INFO_V1(count_person); __declspec(dllex

Re: [GENERAL] C-functions using SPI Missing Magic Block Error

2010-07-02 Thread Tom Lane
saitenhe...@web.de writes: > I compiled the file "pgExampleSPI.c" with the following code without any > error: > /* Use 32-bit timer (provided header file uses 64-bit timer, not > * compatible with Windows postgreSQL versions */ > #define _USE_32BIT_TIME_T > #include "postgres.h" > #include "exe

Re: [GENERAL] pgpool-II (max_pool and num_init_children)

2010-07-02 Thread Guillaume Lelarge
Le 02/07/2010 15:46, Geoffrey a écrit : > Tatsuo Ishii wrote: >>> I'm trying to get a handle on sane values for these two parameters. >>> I assume that they should somehow correlate to my existing >>> max_connections in my postgresql.conf file. Anyone using pgpool-II >>> care to comment? >>> >>>

Re: [GENERAL] Postgresql partitioning - single hot table or distributed

2010-07-02 Thread Scott Marlowe
On Tue, Jun 29, 2010 at 4:00 PM, sam mulube wrote: > Hi, > > we are considering database partitioning as a possible solution to > some performance issues we are having with our database, and we are > trying to decide on a partitioning scheme. We have a moderately write > heavy application (approx

Re: [GENERAL] change array dimension

2010-07-02 Thread Merlin Moncure
On Thu, Jul 1, 2010 at 7:32 PM, Gerhard Heift wrote: > Hello, > > is it possible to change the dimension of an array? I am looking for something > like this: > > SELECT change_array_dims('[1:2][1:2]', '{1,2,3,4}'::int[]); >  change_array_dims > --- >  {{1,2},{3,4}} > > and the othe

Re: [GENERAL] pgpool-II (max_pool and num_init_children)

2010-07-02 Thread Geoffrey
Tatsuo Ishii wrote: I'm trying to get a handle on sane values for these two parameters. I assume that they should somehow correlate to my existing max_connections in my postgresql.conf file. Anyone using pgpool-II care to comment? I'm sure it's a balancing act between how many connections

[GENERAL] C-functions using SPI Missing Magic Block Error

2010-07-02 Thread Saitenheini
Hello, I've got a problem with user defined functions in C using SPI. Using: PostgreSQL 8.3.7, Codeblocks (GNU GCC Compiler), Windows Server 2003 R2 I compiled the file "pgExampleSPI.c" with the following code without any error: /* Use 32-bit timer (provided header file uses 64-bit timer, not *

Re: [GENERAL] Postgresql partitioning - single hot table or distributed

2010-07-02 Thread Greg Smith
Vick Khera wrote: The drawback to partitioning by an ID number using modulo is that for constraint exclusion to work you have to actually add something like "AND (my_id % 42) = 0" to match the constraint. The exclusion is not done by executing the constraint, but by proving the constraint will h

[GENERAL] C-Functions using SPI - Missing Magic Block

2010-07-02 Thread Saitenheini
Hello,I've got a problem with Functions in C using SPI.Using: PostgreSQL 8.3, Codeblocks, Windows Server 2003 R2I compiled the file "pgExampleSPI.c" with the following code without any error:/* Use 32-bit timer (provided header file uses 64-bit timer, not* compatible with Windows postgreSQL version

[GENERAL] Autovacuum and pg_largeobject

2010-07-02 Thread Norberto Delle
Hi all I would like to know if the large object table pg_largeobject is routinely checked by the autovacuum daemon. I ask about this because I have a database in wich the pg_largeobject table is being forcibly vacuumed because it's relfrozenxid is now greater than autovacuum_freeze_max_age, and

Re: [GENERAL] pgpool-II (max_pool and num_init_children)

2010-07-02 Thread Tatsuo Ishii
> I'm trying to get a handle on sane values for these two parameters. I > assume that they should somehow correlate to my existing > max_connections in my postgresql.conf file. Anyone using pgpool-II care > to comment? > > I'm sure it's a balancing act between how many connections you want

Re: [GENERAL] Query to "balance" rows across multiple tables

2010-07-02 Thread Tim Landscheidt
Mike Christensen wrote: > [...] > Here's the catch: I want to DELETE any row (in either table) that has > zero quantity, since I no longer need this data (plus I have a CHECK > constraint on this value and require it to be positive anyway).. > Is there actually a way to do this in a SQL function

[GENERAL] pgpool-II (max_pool and num_init_children)

2010-07-02 Thread Geoffrey
I'm trying to get a handle on sane values for these two parameters. I assume that they should somehow correlate to my existing max_connections in my postgresql.conf file. Anyone using pgpool-II care to comment? I'm sure it's a balancing act between how many connections you want verses how

Re: [GENERAL] bulk insert using COPY and PHP code

2010-07-02 Thread Pavel Stehule
2010/7/2 Babu R > > Hello, > > Am exploring a way for bulk insert using \COPY with the CSV format data using > PHP code. Is there any way to achieve this? > > Thanks, > - Babu > hello look on http://php.net/manual/en/function.pg-put-line.php Regards Pavel Stehule -- Sent via pgsql-general

[GENERAL] bulk insert using COPY and PHP code

2010-07-02 Thread Babu R
Hello, Am exploring a way for bulk insert using \COPY with the CSV format data using PHP code. Is there any way to achieve this? Thanks, - Babu

[GENERAL] Query to "balance" rows across multiple tables

2010-07-02 Thread Mike Christensen
I have two tables. One for the quantity of an item I need to buy, and one for the quantity of an item I already own. I want to "balance" these two tables so that I subtract the amount I need from what I own.. For example: ToBuy - Item A: 6 Item B: 5 Item C: 3 Owned - Item A: 1

Re: [GENERAL] Uncable to commit: transaction marked for rollback

2010-07-02 Thread Wappler, Robert
On 2010-07-01, David Kerr wrote: > I'm intermittantly getting this error message in a java app. > using Geronimo / Hibernate / Postgres 8.3.9 > > javax.transaction.RollbackException: Unable to commit: > transaction marked for > rollback > > Can someone give me a scenario where this would happen