Re: [GENERAL] Debugging postgresql source on gdb

2007-07-21 Thread Tom Lane
Shreya Bhargava <[EMAIL PROTECTED]> writes: > 1. gdb postgres > 2. set args -D test (test is my dbcluster) > 3. b hashbuild(this is the function i want to break on) > 4. run You've set the breakpoint in the postmaster process. It won't propagate to child backends, at least not without special gdb

[GENERAL] Debugging postgresql source on gdb

2007-07-21 Thread Shreya Bhargava
Hi, I am trying to debug postgres source code using gdb. I set a breakpoint on a function, but it never stops when it reaches that function. Here are the steps: 1. gdb postgres 2. set args -D test (test is my dbcluster) 3. b hashbuild(this is the function i want to break on) 4. run 5. start a cl

Re: [GENERAL] 8.2.4 signal 11 with large transaction

2007-07-21 Thread Sibte Abbas
On 7/20/07, Tom Lane <[EMAIL PROTECTED]> wrote: I guess what we need to do is hack the emergency-recovery path for error-during-error-processing such that it will prevent trying to print a very long debug_query_string. Maybe we should just not try to print the command at all in this case, or ma

Re: [GENERAL] posgres tunning

2007-07-21 Thread Michael Fuhr
On Sat, Jul 21, 2007 at 09:54:35PM -0500, Arnaldo Gandol wrote: > I have a drupal site working with postgres that does not tolerate more > than 200 concurrent connections(it is not hardware fault). What does "not tolerate" mean? Does the database refuse connections beyond 200? Does it permit co

Re: [GENERAL] encodings

2007-07-21 Thread Michael Fuhr
On Sat, Jul 21, 2007 at 10:24:38PM +0200, Zlatko Matić wrote: > If I have an UTF8 database, dump it and the restore as WIN1250 database, > then dump it again and restore as UTF8, would structure of the database > (schema) be exactly the same as initial database, or something will > change in the pr

Re: [GENERAL] Foreign key constraint question

2007-07-21 Thread Alvaro Herrera
Nis Jørgensen wrote: > What if, for instance, I want to render a list of shapes? > > To render the shape, I need to get its data, to get its data, I need to > know what type it is. ISTM that the easiest way to achieve this is > storing the type info at the "top" of the table hierarchy. Try addin

[GENERAL] posgres tunning

2007-07-21 Thread Arnaldo Gandol
I have a drupal site working with postgres that does not tolerate more than 200 concurrent connections(it is not hardware fault). Does anybody know how to adjust postgres parameters and what are them?, or how to get a better performance in any way?

[GENERAL] spool function in nbtree index

2007-07-21 Thread Teju
Hi, I am trying to understand the function of spool structure in btree index creation. I understand that there are 2 of them, one for the itups to be sorted and the other for dead tuples. Now, if I want to see all the itups that are loaded into the main spool (not spool for the dead tuples),

Re: [GENERAL] 8.2.4 signal 11 with large transaction

2007-07-21 Thread Chris Hoover
On 7/20/07, Tom Lane <[EMAIL PROTECTED]> wrote: I guess what we need to do is hack the emergency-recovery path for error-during-error-processing such that it will prevent trying to print a very long debug_query_string. Maybe we should just not try to print the command at all in this case, or ma

[GENERAL] CentOS 4 RPMs for 8.2.4?

2007-07-21 Thread Steve Wampler
I'd like to update from 8.1.9 to 8.2.4 to take advantage of the multiple value INSERT but don't see at least two of the RPMs for 8.2.4 that I need. The installed 8.1.9 RPMs (from the centosplus repository) are: postgresql-8.1.9-1.el4s1.1 postgresql-contrib-8.1.9-1.el4s1.1 postgresql-devel

Re: [GENERAL] Help with date math

2007-07-21 Thread Ragnar
On fös, 2007-07-20 at 11:08 -0400, Chris Hoover wrote: > I need some help. I am trying to replicate a function from Sybase > ASA, and am having difficulty. > > I need to be able to subtract 2 date (or timestamps) and return the > results expressed in days, weeks, month, quarters, or years. How d

Re: [GENERAL] help with tsearch2 stem compile

2007-07-21 Thread Oleg Bartunov
try patch from http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/ which updates snowball api Oleg On Tue, 17 Jul 2007, marcelo Cortez wrote: hi all i'm using postgresql 8.2.4 and install tsearch2 , but i need spanish idiom. following http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/

Re: [GENERAL] Help with date math

2007-07-21 Thread Reid Thompson
Chris Hoover wrote: I need some help. I am trying to replicate a function from Sybase ASA, and am having difficulty. I need to be able to subtract 2 date (or timestamps) and return the results expressed in days, weeks, month, quarters, or years. How do I do this? I believe Postgres is ret

Re: [GENERAL] Help with date math

2007-07-21 Thread Reid Thompson
Chris Hoover wrote: I need some help. I am trying to replicate a function from Sybase ASA, and am having difficulty. I need to be able to subtract 2 date (or timestamps) and return the results expressed in days, weeks, month, quarters, or years. How do I do this? I believe Postgres is ret

[GENERAL] help with tsearch2 stem compile

2007-07-21 Thread marcelo Cortez
hi all i'm using postgresql 8.2.4 and install tsearch2 , but i need spanish idiom. following http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/README.gendict and downloading http://snowball.tartarus.org/algorithms/spanish/stemmer.html stem.c and stem.h ./config.sh -n pt -s -p spanish

[GENERAL] Difference between PRIMARY KEY index and UNIQUE-NOT NULL index

2007-07-21 Thread Vincenzo Romano
Hi all. Maybe mine is a stupid question, but I'd like to know the answer if possible. In an inner join involving a 16M+ rows table and a 100+ rows table performances got drastically improved by 100+ times by replacing a UNIQUE-NOT NULL index with a PRIMARY KEY on the very same columns in the ver

[GENERAL] Problem with large bytea fields in windows

2007-07-21 Thread Al Rosenthal
I have been having a lot of trouble with postgres and large bytea fields under windows and would appreciate any suggestions. I have a large database (22 GB) that I have slowly grown on one machine. It is currently running postgres 8.2.3 under windows xp. It is a simple db with one table that ha

Re: [GENERAL] Update of table lags execution of statement by >1 minute?

2007-07-21 Thread Erik Peterson
This happens in the same session. I have an application that had been encountering this issue periodically, and I have rigged it to send me an email whenever it happens. I¹ll get that email, fire up my client, and try to update the row manually. Right after my update (autocommit is on, but it ma

[GENERAL] PGInstaller Project

2007-07-21 Thread Mitchell Vincent
This project is of great interest to me as I am looking for a easier-to-deploy database server and I've always loved PostgreSQL. the PGInstaller project (http://pgfoundry.org/projects/pginstaller/) looks like what I need but I'm worried that it's abandoned. I see a beta posted back in April but no

[GENERAL] shp2pgsql Help with sintax!

2007-07-21 Thread GPS Blaster
Hi! New to postgres, im trying to import shapefiles into postgres 8.2 using shp2pgsql but so far have failed. I tryed using the -p option just to prepare / create the tables then insert the data, but no luck, please help me writing the correct syntax to acomplish for the following: Shapefile na

Re: [GENERAL] Foreign key constraint question

2007-07-21 Thread Lew
Perry Smith wrote: I want to do something like this: ALTER TABLE companies ADD CONSTRAINT fk_companies_item_id FOREIGN KEY (item_id, 'Company') REFERENCES item_bases(item_id, item_type) INITIALLY DEFERRED I could add a column to companies that is always se

[GENERAL] postgresql compile problem

2007-07-21 Thread caij
Hi, Eecently, I have downloaded the postgresql-8.1.9.tar.gz from the official website,and then I install in my linux System ,whose gcc version is 2.9.6.Although I can install it successfully,then result version I check is 7.2.1~£¬and how can this happen,can u tell me the reason? Thanks a lot ! Reg

[GENERAL] Help with date math

2007-07-21 Thread Chris Hoover
I need some help. I am trying to replicate a function from Sybase ASA, and am having difficulty. I need to be able to subtract 2 date (or timestamps) and return the results expressed in days, weeks, month, quarters, or years. How do I do this? I believe Postgres is returning the number of days

[GENERAL] Primary Key Performance with INTEGER vs. VARCHAR

2007-07-21 Thread Siah
Hi, Designing my application, I was wondering if having my primary keys (to be indexed) with VARCHAR brings performance down significantly? My own test didn't show much difference. Thinking about it though, I'd guess Integer Indexing should be much quicker and efficient. I'd appreciate all commen

Re: [GENERAL] Ordering by a complex field

2007-07-21 Thread Patrick TJ McPhee
In article <[EMAIL PROTECTED]>, Robert James <[EMAIL PROTECTED]> wrote: % I'd like to order so that records where field='2' come first, then '1', then % '9', then anything but '0', then '0'. Is there anyway to do this in a % standard order by clause (that is, without writing a new SQL function)?

[GENERAL] encodings

2007-07-21 Thread Zlatko Matić
Hello. If I have an UTF8 database, dump it and the restore as WIN1250 database, then dump it again and restore as UTF8, would structure of the database (schema) be exactly the same as initial database, or something will change in the process? In other words, does encoding influence only data stor

Re: [GENERAL] Foreign key constraint question

2007-07-21 Thread Nis Jørgensen
Jeff Davis skrev: > On Fri, 2007-07-20 at 19:18 -0500, Perry Smith wrote: >>> The relational model handles inheritance and polymorphism very well if >>> you don't store types as values. >> What if I have just an id for an item? This will happen when another >> table references an item. How do I

Re: [GENERAL] Char vs SmallInt

2007-07-21 Thread Gregory Stark
"Pg Coder" <[EMAIL PROTECTED]> writes: > Which data type is smaller and will lead to better query performance - > smallint or char? smallint is 2 bytes, usually with 2-byte alignment. If you declare a column as char it means CHAR(1) which in 8.2 is 5-8 bytes (5 bytes if it's an ascii character)

[GENERAL] Best interval timeout and check interval for Slony

2007-07-21 Thread angga erwina
Hi, All i want to replicate my DB with one master and two Slave over VPN with bandwidth 64Kbps and my DB 125MB..what is the best interval timeout and time to check interval..for this time, i use default..any one has the best experience for timeout?? can i use trigger to make connection timeout?? c