Re: [GENERAL] pg_autovacuum not doing anything

2005-09-12 Thread Sim Zacks
I verified that it was not doing anything by erasing the pg_statistics table and it did not fill it within 24 hours. When I ran vacuum analyze manually it filled it in. I am using postgresql 8.03 on gentoo which was downloaded with portage and included pg_autovacuum as part of the set up. I

Re: [GENERAL] SQL - planet redundant data

2005-09-12 Thread Poul Jensen
Thank you for your input! Individual replies follow below. ## Chris Travers wrote: Ok. Imagine two huge huge tables: file_dataand additional_data create_table file_data ( file_id serial primary key, station_id text, ); create table

[GENERAL] help me learn

2005-09-12 Thread suresh ramasamy
hi, i'm new to postgreSQL as well as new to database concepts. please tell me how can i learn. i mean the easiest and fast way. Your help will be appreciated.

Re: [GENERAL] help me learn

2005-09-12 Thread A. Kretschmer
am 12.09.2005, um 17:08:31 +0530 mailte suresh ramasamy folgendes: hi, i'm new to postgreSQL as well as new to database concepts. please tell me how can i learn. i mean the easiest and fast way. Your help will be Read a book. http://techdocs.postgresql.org/techdocs/bookreviews.php

Re: [GENERAL] help me learn

2005-09-12 Thread Berend Tober
suresh ramasamy wrote: i'm new to postgreSQL as well as new to database concepts. please tell me how can i learn. i mean the easiest and fast way. Your help will be appreciated. Make an appropriate posting to pgsql-jobs? ---(end of

[GENERAL] Replication

2005-09-12 Thread barry
Hi, I currently have a postgresql 8 system which I want to replicate (ideally in realtime) with a spare host in order to introduce some redundancy - eg. if the master server dies then I've got a ready-to-go backup. Switchover does not have to be automated. I've looked into commandprompt.com's

Re: [GENERAL] Replication

2005-09-12 Thread Peter Eisentraut
Am Montag, 12. September 2005 13:52 schrieb [EMAIL PROTECTED]: I currently have a postgresql 8 system which I want to replicate Look at DRBD. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 1: if

[GENERAL] If an index is based on 3 columns will a query using two of the columns utilize the index?

2005-09-12 Thread Reid Thompson
Example: assume a table of 10 columns, three of which are fname, lname, and dob. If an index is created on (fname, lname, dob), will a query that utilizes two of the columns ( select 'data' from table where fname = 'X' and lname = 'Y') utilize the index? thanks, reid

Re: [GENERAL] If an index is based on 3 columns will a query using two of the columns utilize the index?

2005-09-12 Thread Alvaro Herrera
On Mon, Sep 12, 2005 at 09:43:57AM -0400, Reid Thompson wrote: Example: assume a table of 10 columns, three of which are fname, lname, and dob. If an index is created on (fname, lname, dob), will a query that utilizes two of the columns ( select 'data' from table where fname = 'X' and lname =

Re: [GENERAL] If an index is based on 3 columns will a query using two of the columns utilize the index?

2005-09-12 Thread Reid Thompson
Alvaro Herrera wrote: On Mon, Sep 12, 2005 at 09:43:57AM -0400, Reid Thompson wrote: Example: assume a table of 10 columns, three of which are fname, lname, and dob. If an index is created on (fname, lname, dob), will a query that utilizes two of the columns ( select 'data' from table where

Re: [GENERAL] If an index is based on 3 columns will a query using two of the columns utilize the index?

2005-09-12 Thread Michael Fuhr
On Mon, Sep 12, 2005 at 09:43:57AM -0400, Reid Thompson wrote: assume a table of 10 columns, three of which are fname, lname, and dob. If an index is created on (fname, lname, dob), will a query that utilizes two of the columns ( select 'data' from table where fname = 'X' and lname = 'Y')

Re: [GENERAL] If an index is based on 3 columns will a query using two of the columns utilize the index?

2005-09-12 Thread Michael Fuhr
On Mon, Sep 12, 2005 at 10:05:36AM -0400, Reid Thompson wrote: Alvaro Herrera wrote: Note that if your example query used the columns (lname, dob), the answer would be no. Why is that? In order to use an index, does the query have to utilize the 'first' element of the index? In released

Re: [GENERAL] If an index is based on 3 columns will a query using two of the columns utilize the index?

2005-09-12 Thread Alvaro Herrera
On Mon, Sep 12, 2005 at 10:05:36AM -0400, Reid Thompson wrote: Alvaro Herrera wrote: On Mon, Sep 12, 2005 at 09:43:57AM -0400, Reid Thompson wrote: Example: assume a table of 10 columns, three of which are fname, lname, and dob. If an index is created on (fname, lname, dob), will a query

Re: [GENERAL] If an index is based on 3 columns will a query using two of the columns utilize the index?

2005-09-12 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: On Mon, Sep 12, 2005 at 09:43:57AM -0400, Reid Thompson wrote: Example: assume a table of 10 columns, three of which are fname, lname, and dob. If an index is created on (fname, lname, dob), will a query that utilizes two of the columns ( select 'data'

Re: [GENERAL] SQL - planet redundant data

2005-09-12 Thread John D. Burger
Hmm, in fact if the redundant values you're worried about come in long stretches (e.g., temperature is the same for many observations in a row), I suppose you could do the same thing - map a constant value to the range of observation IDs for which it holds. This gets back to having many

Re: [GENERAL] If an index is based on 3 columns will a query using two of the columns utilize the index?

2005-09-12 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: On Mon, Sep 12, 2005 at 10:05:36AM -0400, Reid Thompson wrote: Why is that? In order to use an index, does the query have to utilize the 'first' element of the index? The leftmost part. There's no way to scan an index if you don't know the key. On a

Re: [GENERAL] Replication

2005-09-12 Thread Joshua D. Drake
[EMAIL PROTECTED] wrote: I've looked into commandprompt.com's mammoth system, but it only supports up to 1000 tables (the documentation doesn't mention this!) - the database in question has more than 1000 tables, and adds new tables regularly. Slony-I and pgpool apparently don't support

Re: [GENERAL] If an index is based on 3 columns will a query using

2005-09-12 Thread Teodor Sigaev
Greg Stark suggests here: http://archives.postgresql.org/pgsql-hackers/2005-05/msg00966.php that GiST could also be fixed to work with any subset of the index columns, but it hasn't been done yet, unless Teodor and Oleg snuck something in during that last round of GiST work. GiST may work with

Re: [GENERAL] If an index is based on 3 columns will a query using two of the columns utilize the index?

2005-09-12 Thread Greg Stark
Tom Lane [EMAIL PROTECTED] writes: Alvaro Herrera [EMAIL PROTECTED] writes: Yes, if it is selective enough. (It _can_ use the index, which does not mean that it _will_ use it.) Note that if your example query used the columns (lname, dob), the answer would be no. Actually, that last

Re: [GENERAL] ERROR: type temp_gc already exists

2005-09-12 Thread Janning Vygen
Am Samstag, 10. September 2005 18:05 schrieb Tom Lane: Janning Vygen [EMAIL PROTECTED] writes: i guess the table was dropped but not the corresponding type. How can things like this happen? Corrupted pg_depend table maybe? You might try REINDEXing pg_depend to be on the safe side. Also

Re: [GENERAL] If an index is based on 3 columns will a query using two of the columns utilize the index?

2005-09-12 Thread Tom Lane
Teodor Sigaev [EMAIL PROTECTED] writes: GiST may work with any subset of index columns too. Even in existing code I don't see any problem except NULL in a first column. GiST doesn't store tuples with leading NULL value (gist.c lines 174, 326), so index doesn't contained them. Well,

Re: [GENERAL] If an index is based on 3 columns will a query using two of the columns utilize the index?

2005-09-12 Thread Tom Lane
Greg Stark [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] writes: http://archives.postgresql.org/pgsql-committers/2005-06/msg00156.php Did that patch actually implement skip scanning? No, it just removed the planner's arbitrary assumption that the index methods wouldn't cope. Skip

Re: [GENERAL] Replication

2005-09-12 Thread Simon Riggs
Barry, You can use PITR to archive transaction logs to a second server that is kept in standby mode. This will cope with any number of tables and cope with dynamic changes to tables. This is fairly straightforward and very low overhead. Set archive_command to a program that transfers xlog

Re: [GENERAL] linux pg pointed to windows partition for db

2005-09-12 Thread Steve Atkins
On Sun, Sep 11, 2005 at 06:36:26PM +0100, mike dixon wrote: Tried a couple other places and aren't getting anywhere. A windows xp program I use uses pgsql; I'd like to create a backup of the db but from within linux without xp running (I run xp in vmware; and the xp db backup will be

Re: [GENERAL] ERROR: type temp_gc already exists

2005-09-12 Thread Tom Lane
Janning Vygen [EMAIL PROTECTED] writes: Am Samstag, 10. September 2005 18:05 schrieb Tom Lane: If there's no pg_depend entry then DROP TYPE should work. Otherwise you might have to resort to manually DELETEing the pg_type row. Thanks for your detailed answer. I don't want to do anything

Re: [GENERAL] SQL - planet redundant data

2005-09-12 Thread Poul Jensen
Thank you, John! I misunderstood you the first time, but I now see we have the same thing in mind. So you'd have most of your data in a main table: create table observations ( obsIDintegerprimary key,-- Maybe a BIGINT temperaturefloat, etc. ); and

[GENERAL] PQtrace doesn't work

2005-09-12 Thread W. van den Akker
Hello, I've send this message also on 29-1-2004 and have since no solution for this problem .. :o . I have a little test program (see at the end of the message). The program crashes when PQTrace is called (instruction referenced memory at 0x0010, the memory could not be written

[GENERAL] Building postgres on Suze

2005-09-12 Thread Christian Goetze
I'm trying to build postgres on Suze with --with-pam, and it tells me: /usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/bin/ld: cannot find -lpam I know it is actually installed, and disecting the configure script and hand-compiling the test program works if I say

Re: [GENERAL] Replication

2005-09-12 Thread Tatsuo Ishii
I currently have a postgresql 8 system which I want to replicate (ideally in realtime) with a spare host in order to introduce some redundancy - eg. if the master server dies then I've got a ready-to-go backup. Switchover does not have to be automated. I've looked into commandprompt.com's

[GENERAL] Utility that creates table schema from csv data?

2005-09-12 Thread CSN
Probably wishful thinking, but who knows - maybe there's something in contrib! I have a bunch of csv data with the field names specified on the first line of the various files. Is there any such utility that will create a table schema using the field names AND look through the data and determine

Re: [GENERAL] SQL - planet redundant data

2005-09-12 Thread Brent Wood
That is exactly what I want, and now I finally see how to do it (I think!). However, it is a considerable amount of work to set this up manually, plus, it has been a headache realizing how to get there at all. I'm hoping that one or more of the developers think it would be a good idea for