Re: [GENERAL] Using the wrong index (very suboptimal), why?

2008-12-22 Thread Tom Lane
"Shane Wright" writes: > It's not that it isn't using any index (so enable_seqscan=off doesn't > help), it's that the index it picks is suboptimal. > The query is based on 3 of the table columns - there is an index on all > three, but it prefers to use an index on just two of them, then > filteri

Re: [GENERAL] Backup Policy & Disk Space Issues

2008-12-22 Thread Craig Ringer
Volkan YAZICI wrote: > On Mon, 22 Dec 2008, David Fetter writes: >> On Mon, Dec 22, 2008 at 10:07:21AM +0200, Volkan YAZICI wrote: >>> 15x4250 = 63750 = 62.25TB >> SATA disk space is quite cheap these days, so unless something is very >> badly wrong with your funding model, this is not really a

Re: [GENERAL] lack of consequence with domains and types

2008-12-22 Thread Grzegorz Jaśkiewicz
On Mon, Dec 22, 2008 at 6:10 PM, Erik Jones wrote: > As mentioned above, by "fixing" the behavior to be what you're expecting > you'd be breaking the defined behavior of ALTER TABLE. I don't understand. The domain's have default values, how will it break alter table ? Please explain. -- GJ -

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Jonah H. Harris
On Mon, Dec 22, 2008 at 12:34 PM, Christophe wrote: > Playing the straight man, I have to ask: Scalability issues with locks in PG > vs Oracle? (in slow motion) no. Locks aren't something particular I'd like to discuss, this topic just came from a post upthread. -- Jonah H. Harris, Sen

Re: [GENERAL] Backup Policy & Disk Space Issues

2008-12-22 Thread Volkan YAZICI
On Mon, 22 Dec 2008, David Fetter writes: > On Mon, Dec 22, 2008 at 10:07:21AM +0200, Volkan YAZICI wrote: >> Hi, >> >> In the company, we're facing with serious disk space problems which >> is not caused by PostgreSQL, but the nature of our data. Database >> sizes are around 200-300GB, which is

[GENERAL] Using the wrong index (very suboptimal), why?

2008-12-22 Thread Shane Wright
Hi, I have somewhat of a quandary with a large table in my database; PostgreSQL is choosing the 'wrong' index for a certain kind of query; causing performance to become an order of magnitude slower (query times usually measured in milliseconds now become seconds/minutes!). It's not that it isn't

Re: [GENERAL] Erro in vaccum

2008-12-22 Thread Scott Marlowe
On Mon, Dec 22, 2008 at 10:22 AM, paulo matadr wrote: > > My vacuum was follow error below: > WARNING: oldest xmin is far in the past > HINT: Close open transactions soon to avoid wraparound problems. > No have transactions in locked , Transactions don't have to hold locks to cause problems.

Re: [GENERAL] Ordering returned rows according to a list

2008-12-22 Thread Sebastian Tennant
Quoth "Adam Rich" : >> I'd like to make a single query that returns a number of rows using a >> 'WHERE id IN ()' condition, but I'd like the rows to be >> returned in the order in which the ids are given in the list. >> > Depending on how many IDs you have in your list, you can accomplish this > wi

Re: [GENERAL] Ordering returned rows according to a list

2008-12-22 Thread Adam Rich
> > Hi all, > > I'd like to make a single query that returns a number of rows using a > 'WHERE id IN ()' condition, but I'd like the rows to be > returned in the order in which the ids are given in the list. > > Is this possible? > Depending on how many IDs you have in your list, you can accom

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Christophe
Playing the straight man, I have to ask: Scalability issues with locks in PG vs Oracle? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Erro in vaccum

2008-12-22 Thread paulo matadr
My vacuum was follow error below: WARNING: oldest xmin is far in the past HINT: Close open transactions soon to avoid wraparound problems. No have transactions in locked , what's could be happen? Paulo Moraes Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbus

[GENERAL] Ordering returned rows according to a list

2008-12-22 Thread Sebastian Tennant
Hi all, I'd like to make a single query that returns a number of rows using a 'WHERE id IN ()' condition, but I'd like the rows to be returned in the order in which the ids are given in the list. Is this possible? Sebastian -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] lack of consequence with domains and types

2008-12-22 Thread Erik Jones
On Dec 22, 2008, at 4:49 AM, Grzegorz Jaśkiewicz wrote: so, consider this one: create sequence seq1; create domain foo1 as bigint default nextval('seq1') not null; create domain foo2 as timestamp without time zone default now() not null; create type footype as ( a foo1, b foo2 ) ; create

Re: [GENERAL] Backup Policy & Disk Space Issues

2008-12-22 Thread David Fetter
On Mon, Dec 22, 2008 at 10:07:21AM +0200, Volkan YAZICI wrote: > Hi, > > In the company, we're facing with serious disk space problems which > is not caused by PostgreSQL, but the nature of our data. Database > sizes are around 200-300GB, which is relatively not that much, but > databases require

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Geoffrey
Jonah H. Harris wrote: On Mon, Dec 22, 2008 at 7:37 AM, Geoffrey wrote: I still haven't seen a post regarding the Oracle scalability issue. Where is the data?? You mean the PG scalability issue in comparison to Oracle? Yes. -- Until later, Geoffrey Those who would give up essential Liber

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Jonah H. Harris
On Mon, Dec 22, 2008 at 9:35 AM, James B. Byrne wrote: > I think that to describe either OS or commercial software as better or > worse is misleading. The most that can be said is that each approach > serves a different purpose and exists in a different environment. Well said. -- Jonah H. Harr

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread James B. Byrne
In-Reply-to: <200812220435.mbm4zmd07...@momjian.us> On: Sun, 21 Dec 2008 23:35:48 -0500 (EST), Bruce Momjian wrote: > I am sure there are smart people at all the database companies. I do > believe that open source development harnesses the abilities of its > intelligent people better than comme

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Jonah H. Harris
On Mon, Dec 22, 2008 at 8:22 AM, Alvaro Herrera wrote: > The other difference is that I said it jokingly, whereas you (Jonah) > seem to be bitter about the whole matter. Well, it wasn't clear and I was just in a generally bad mood. Usually you'd add a :) at the end, which you didn't this time.

[GENERAL] design & available tricks: traversing heterogeneous tree (table-level + linked list)

2008-12-22 Thread Ivan Sergio Borgonovo
I've such a structure: create table catalog_fam ( famid int primary key, name varchar(255), action smallint ); create table catalog_macro ( macroid int primary key, famid int references catalog_fam (famid), name varchar(255), action smallint ); create table catalog_cat ( catid int

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Alvaro Herrera
Scott Marlowe escribió: > The difference is HE put forth an opinion about the pg developers > being smarter, but you put forth what seems like a statement of fact > with no evidence to back it up. The other difference is that I said it jokingly, whereas you (Jonah) seem to be bitter about the who

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Jonah H. Harris
On Mon, Dec 22, 2008 at 7:37 AM, Geoffrey wrote: > I still haven't seen a post regarding the Oracle scalability issue. Where is > the data?? You mean the PG scalability issue in comparison to Oracle? -- Jonah H. Harris, Senior DBA myYearbook.com -- Sent via pgsql-general mailing list (pgsql-g

Re: [GENERAL] lack of consequence with domains and types

2008-12-22 Thread Grzegorz Jaśkiewicz
On Mon, Dec 22, 2008 at 1:49 PM, Grzegorz Jaśkiewicz wrote: > but that defeats whole purpose of domains, doesn't it ? > > well, on top of that - I could create another domain with default > (nextval, now), but still Well I can't, it doesn't work :( create domain xyz as footype default(nextva

[GENERAL] lack of consequence with domains and types

2008-12-22 Thread Grzegorz Jaśkiewicz
so, consider this one: create sequence seq1; create domain foo1 as bigint default nextval('seq1') not null; create domain foo2 as timestamp without time zone default now() not null; create type footype as ( a foo1, b foo2 ) ; create table bar(a bigint not null, b varchar(20)); insert into ba

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Geoffrey
Jonah H. Harris wrote: On Sun, Dec 21, 2008 at 11:02 PM, Scott Marlowe wrote: The difference is HE put forth an opinion about the pg developers being smarter, but you put forth what seems like a statement of fact with no evidence to back it up. One is quite subjective and open for debate on bo

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Grzegorz Jaśkiewicz
On Mon, Dec 22, 2008 at 5:41 AM, Scott Marlowe wrote: > I think one of the points that proves this is the chunks of innovative > code that have been put into postgresql that were basically written by > one or two guys in < 1 year. Small sharp teams can tackle one > particular problem and do it ve

[GENERAL] Backup Policy & Disk Space Issues

2008-12-22 Thread Volkan YAZICI
Hi, In the company, we're facing with serious disk space problems which is not caused by PostgreSQL, but the nature of our data. Database sizes are around 200-300GB, which is relatively not that much, but databases require strict backup policies: - Incremental backup for each day. (250GB) - Full