[GENERAL] Data merging problem

2009-06-17 Thread subodh chaudhari
Hi , I am working on project which include merging of two databases within postgresql on Linux. I have searched for s/w but didnt get any useful. So if any one having any information about such s/w please help me out. This s/w should have GPL. (Opensource s/w). I want to sync two database i.e. the

Re: [GENERAL] Data merging problem

2009-06-17 Thread John R Pierce
subodh chaudhari wrote: Hi , I am working on project which include merging of two databases within postgresql on Linux. I have searched for s/w but didnt get any useful. So if any one having any information about such s/w please help me out. This s/w should have GPL. (Opensource s/w). I want

Re: [GENERAL] Dynamic table

2009-06-17 Thread A B
> Your problem is currently sounding very much like an exam question; you > seem to be arbitrarily making decisions without showing any real data. > When you deal with real problems in the real world you're normally > making compromises when you model things and hence the decisions > wouldn't be as

[GENERAL] PostgreSQL server NOT STARTED

2009-06-17 Thread Chandra Sekar R
Hi All, I recently installed PostgreSQL 8.3.7 into my windows xp m/c. When I start PostgreSQL server through My computer>control panel>Administrative tools>services>PostgreSQL server>start NOT STARTED and the following error mesage appeared: "some services started and stoped because of they have

[GENERAL] simulating high load for vacuum full

2009-06-17 Thread Ivan Sergio Borgonovo
I'm trying to diagnose a problem that happened during vacuum full. It is a programming problem triggered by some lock, delay whatever, happening during vacuum. Making large updates to a bunch of tables is a PITA just to obtain a slow VACUUM FULL. Restoring a "fragmented" DB doesn't look as a wor

Re: [GENERAL] PostgreSQL server NOT STARTED

2009-06-17 Thread John R Pierce
Chandra Sekar R wrote: I recently installed PostgreSQL 8.3.7 into my windows xp m/c. When I start PostgreSQL server through My computer>control panel>Administrative tools>services>PostgreSQL server>start NOT STARTED and the following error mesage appeared: "some services started and stoped b

[GENERAL] Naming functions with reserved words

2009-06-17 Thread Scott Bailey
I noticed in the temporal project they used reserved words for their functions (union, intersect, etc) But when I try to create a function like that I get an error and I have to quote it both when creating the function and when calling it. The only difference I can see is they their functions

Re: [GENERAL] Data merging problem

2009-06-17 Thread Thomas Kellerer
subodh chaudhari, 17.06.2009 09:05: Hi , I am working on project which include merging of two databases within postgresql on Linux. I have searched for s/w but didnt get any useful. So if any one having any information about such s/w please help me out. This s/w should have GPL. (Opensource s

Re: [GENERAL] simulating high load for vacuum full

2009-06-17 Thread Bill Moran
In response to Ivan Sergio Borgonovo : > I'm trying to diagnose a problem that happened during vacuum full. What _is_ the problem? > It is a programming problem triggered by some lock, delay whatever, > happening during vacuum. The solution is to fix the lock, delay, or whatever issue. > Makin

[GENERAL] used for large media files

2009-06-17 Thread Mike Kay
Greetings. I am in the process of deciding my infrastruture for a web based application dealing with audio, video and image files. In my discussions with web developers PostgreSql came up as a candidate for my database. This is my FIRST introduction to this database, although I've heard of it - I h

Re: [GENERAL] used for large media files

2009-06-17 Thread Bill Moran
In response to "Mike Kay" : > Greetings. I am in the process of deciding my infrastruture for a web > based application dealing with audio, video and image files. In my > discussions with web developers PostgreSql came up as a candidate for my > database. This is my FIRST introduction to this data

[GENERAL] how to cancel a query in progress

2009-06-17 Thread Whit Armstrong
I had a few queries that were fired from pgAdmin, but failed to stop running after I killed the GUI. I tried to stop the queries by killing the pid (of the process running the query, not the pid of the server) from the linux command line, and much to my surprise, the whole database went down and t

[GENERAL] GiST or GIN, I feel like I am doing something wrong

2009-06-17 Thread Aaron
We are testing full text searching on a small chunk of our data. We have created an INDEX to make searching faster. From the PostgreSQL 8.3 docs, we are running 8.3.7, it seems we should be running GIN indexes. The reason GIN on paper seems like the right INDEX: * we have static data * we have ov

Re: [GENERAL] Naming functions with reserved words

2009-06-17 Thread David Fetter
On Wed, Jun 17, 2009 at 01:46:13AM -0700, Scott Bailey wrote: > I noticed in the temporal project they used reserved words for their > functions (union, intersect, etc) > > But when I try to create a function like that I get an error and I have > to quote it both when creating the function and

Re: [GENERAL] Playing with set returning functions in SELECT list - behaviour intended?

2009-06-17 Thread David Fetter
On Tue, Jun 16, 2009 at 10:06:54AM -0400, Tom Lane wrote: > "Albe Laurenz" writes: > > So it looks like the number of result rows is the least common > > multiple of the cardinalities of all columns in the select list. > > It's always been that way. The lack of any obviously-sane way to > handle

Re: [GENERAL] Playing with set returning functions in SELECT list - behaviour intended?

2009-06-17 Thread Tom Lane
David Fetter writes: > On Tue, Jun 16, 2009 at 10:06:54AM -0400, Tom Lane wrote: >> It's always been that way. The lack of any obviously-sane way to >> handle multiple SRFs in a targetlist is exactly why the feature is >> looked on with disfavor. > I must be missing something obvious. Isn't the

[GENERAL] FYI: Load times for a largish DB in 8.2 vs. 8.3 vs. 8.4

2009-06-17 Thread Todd A. Cook
Hi, First, the numbers: PG VersionLoad time pg_database_size autovac -- 8.2.13179 min 92,807,992,820on 8.3.7 180 min 84,048,744,044on (defaults) 8.4b2 206 min 84,0

[GENERAL] Could not reattach to shared memory

2009-06-17 Thread Tuan Hoang Anh
I am running postgres 8.3.7 on windows server 2008 SP1. But this error alway occur : FATAL: could not reattach to shared memory (key=260, addr=0240): 487 .Here is my log 2009-06-17 20:45:18 ICT LOG: database system was shut down at 2009-06-17 17:42:45 ICT 2009-06-17 20:45:22 ICT LOG: da

Re: [GENERAL] Playing with set returning functions in SELECT list - behaviour intended?

2009-06-17 Thread Albe Laurenz
Tom Lane wrote: > It's always been that way. The lack of any obviously-sane way to > handle multiple SRFs in a targetlist is exactly why the feature is > looked on with disfavor. It is clear that there is no really good way to handle this. How about my last example that involved aggregate functi

Re: [GENERAL] Custom Fields Database Architecture

2009-06-17 Thread David Fetter
On Tue, Jun 16, 2009 at 12:50:28PM +0100, Greg Stark wrote: > On Mon, Jun 15, 2009 at 2:04 PM, Gnanam wrote: > > > > I also read some article which talks about the type of patterns: > > 1. Meta-database > > 2. Mutating > > 3. Fixed > > 4. LOB > > > > My question here is, what is the best approach t

Re: [GENERAL] Naming functions with reserved words

2009-06-17 Thread Tom Lane
Scott Bailey writes: > I noticed in the temporal project they used reserved words for their > functions (union, intersect, etc) Uh, what project is that exactly, and was it even working within Postgres? > But when I try to create a function like that I get an error and I have > to quote it bot

Re: [GENERAL] how to cancel a query in progress

2009-06-17 Thread Tom Lane
Whit Armstrong writes: > I had a few queries that were fired from pgAdmin, but failed to stop > running after I killed the GUI. > I tried to stop the queries by killing the pid (of the process running > the query, not the pid of the server) from the linux command line, and > much to my surprise,

Re: [GENERAL] GiST or GIN, I feel like I am doing something wrong

2009-06-17 Thread Tom Lane
Aaron writes: > CREATE INDEX profile_images_fulltext_gin ON profile_images_fulltext > USING gin(content); > CREATE INDEX profile_images_fulltext_gist ON profile_images_fulltext > USING gist(content); What did you have maintenance_work_mem set to while you did this? GIST doesn't care, but GIN like

Re: [GENERAL] used for large media files

2009-06-17 Thread Mike Kay
Now that's an interesting way of doing this I never thought about before. Using a fileserver though, how would I categorize and index the files? I was planning on using multiple databases to hold the data - one for each client and a separate database for each file type. Yes, they would be hosted o

Re: [GENERAL] how to cancel a query in progress

2009-06-17 Thread Whit Armstrong
Thanks, Tom. Lesson learned. Are there any integrity checks I need to run on the db after this type of crash and recovery, or is vacuum --all good enough? -Whit On Wed, Jun 17, 2009 at 11:19 AM, Tom Lane wrote: > Whit Armstrong writes: >> I had a few queries that were fired from pgAdmin, but

Re: [GENERAL] Playing with set returning functions in SELECT list - behaviour intended?

2009-06-17 Thread Tom Lane
"Albe Laurenz" writes: > How about my last example that involved aggregate functions, where > I surprisingly got only one result row? Oh, you're right, now that I look closer that one is a bug. Fixed. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-gene

Re: [GENERAL] how to cancel a query in progress

2009-06-17 Thread Tom Lane
Whit Armstrong writes: > Are there any integrity checks I need to run on the db after this type > of crash and recovery, or is vacuum --all good enough? There isn't anything you need to do. Postgres crashes don't corrupt on-disk data, as a general rule, and a SIGKILL crash seems particularly saf

Re: [GENERAL] used for large media files

2009-06-17 Thread Steve Atkins
On Jun 17, 2009, at 8:43 AM, Mike Kay wrote: Now that's an interesting way of doing this I never thought about before. Using a fileserver though, how would I categorize and index the files? I was planning on using multiple databases to hold the data - one for each client and a separate da

Re: [GENERAL] how to cancel a query in progress

2009-06-17 Thread Whit Armstrong
Thanks. That's a relief. getting a few "page xxx is uninitialized --- fixing" warnings in the vacuum output, but seems like this should be expected since I killed an insert in progress. can anyone confirm that these warnings are ok? WARNING: relation "balances_primary" page 1883404 is uninitia

Re: [GENERAL] GiST or GIN, I feel like I am doing something wrong

2009-06-17 Thread Aaron
Tom, Our maintenance_work_mem is 1024MB so there should have been plenty of memory for INDEX creation. I happened to be watching top when we created the GiN INDEX and the process used about 500MB of non-shared memory. Aaron Thul http://www.chasingnuts.com On Wed, Jun 17, 2009 at 11:30 AM, Tom

[GENERAL] issue with lo_lseek - it returns 4

2009-06-17 Thread Konstantin Izmailov
Hi, I'm trying to get lo size via libpq before starting reading it (postgres server 8.3.5). lo_lseek always returns 4 (actual size is > 1M). I query table with "select photo from employee where id=''". It returns lo oid integer as expected. Then I use following code to obtain size of the lo obj

Re: [GENERAL] Naming functions with reserved words

2009-06-17 Thread artacus
> Uh, what project is that exactly, and was it even working within Postgres? The project is http://pgfoundry.org/projects/temporal/ But it looks like I'm just stupid or confused (or confused and stupid). I'm working on porting temporal extensions I wrote originally for Oracle to Postgres. Whe

[GENERAL] Some strange bug with drop table with slony cluster

2009-06-17 Thread Maxim Boguk
DB version: PostgreSQL 8.3.6 (under linux) no server/db crashes happen before. Server was slave in slony replication. Now problem: table was unsubscribed from replication (without any errors) and then dropped from master without any errors But when i try drop table from slave i got very strange

[GENERAL] partitioning example

2009-06-17 Thread Scott Marlowe
So, I threw this together last night. It's not pretty, it's not perfect, but it works well enough. There are two files, attached, mkstp and mktrig. Both are php programs. The first, mkstp makes partitions. mkstp checks to see if a partition table already exists, if it does it goes on to the ne

Re: [GENERAL] GiST or GIN, I feel like I am doing something wrong

2009-06-17 Thread Oleg Bartunov
Aaron, did you actually check performance of search in both cases ? GiST index can be small but very inefficient, since top-level signatures can be degenerated, so we just remove them. It's easy to see that looking in explain analyze - see difference between number of rows found by index and ac

Re: [GENERAL] issue with lo_lseek - it returns 4

2009-06-17 Thread Konstantin Izmailov
I found the reason - it was bug in my code when inserting lo object. It's size was actually 4. Please ignore or delete my post. On Wed, Jun 17, 2009 at 11:38 AM, Konstantin Izmailov wrote: > Hi, > I'm trying to get lo size via libpq before starting reading it (postgres > server 8.3.5). lo_lseek a

Re: [GENERAL] issue with lo_lseek - it returns 4

2009-06-17 Thread Konstantin Izmailov
Out of curiosity, what if lo object has size > 4GB, how lo_tell return its size? Looks like this is an interface issue. I found a post dated back to 1998, when somebody pointed it out and a posgres developer promised to fix it. Thank you all On Wed, Jun 17, 2009 at 3:15 PM, Konstantin Izmailov w

Re: [GENERAL] how to cancel a query in progress

2009-06-17 Thread Tom Lane
Whit Armstrong writes: > getting a few "page xxx is uninitialized --- fixing" warnings in the > vacuum output, but seems like this should be expected since I killed > an insert in progress. Yeah, that isn't too surprising. When a table runs out of space the first thing we do is extend it with ze

Re: [GENERAL] Some strange bug with drop table with slony cluster

2009-06-17 Thread Tom Lane
Maxim Boguk writes: > Server was slave in slony replication. > Now problem: > table was unsubscribed from replication (without any errors) > and then dropped from master without any errors > But when i try drop table from slave i got very strange error: > hh=# drop TABLE metro_station_old; > ERR

Re: [GENERAL] used for large media files

2009-06-17 Thread justin
Steve Atkins wrote: On Jun 17, 2009, at 8:43 AM, Mike Kay wrote: Now that's an interesting way of doing this I never thought about before. Using a fileserver though, how would I categorize and index the files? I was planning on using multiple databases to hold the data - one for each client

Re: [GENERAL] issue with lo_lseek - it returns 4

2009-06-17 Thread Tom Lane
Konstantin Izmailov writes: > Out of curiosity, what if lo object has size > 4GB, how lo_tell return its > size? Looks like this is an interface issue. That's simple: it can't have such a size. Allowing LOs bigger than 2GB is on the TODO list, but don't hold your breath. Most people who are int

Re: [GENERAL] Some strange bug with drop table with slony cluster

2009-06-17 Thread Scott Marlowe
2009/6/17 Maxim Boguk : > DB version: PostgreSQL 8.3.6 (under linux) > no server/db crashes happen before. > > Server was slave in slony replication. > > Now problem: > table was unsubscribed from replication (without any errors) > and then dropped from master without any errors > > But when i try

Re: [GENERAL] Some strange bug with drop table with slony cluster

2009-06-17 Thread Tom Lane
Scott Marlowe writes: > We've run into issues with drop table and slony as well. What version > of slony are you running? We're running 1.2.14. Latest version in > that branch in 1.2.16, but we haven't had cause to upgrade to it just > yet. I'll be looking at 2.0.latest and 1.2.16 over the sum

Re: [GENERAL] issue with lo_lseek - it returns 4

2009-06-17 Thread Konstantin Izmailov
It would be great to remove the limitation. I can image various possibilities if Postgres can handle larger lo objects. For example, to stream HD content from DB to a multimedia device for displaying. Would that be technically hard to do? My impression is that lo has pretty scalable implementation