Re: [GENERAL] pg_xlog size growing untill it fills the partition

2013-10-04 Thread Alban Hertroys
On Oct 3, 2013, at 23:56, Michal TOMA m...@sicoop.com wrote: I have a problem on my pg 9.2.4 setup (OpenSuse 12.2, kernel 3.2.13). My pg_xlog directory is growing uncontrolably untill it fills the partition. The database is under heavy write load and is spread on two tablesapces one on a

Re: [GENERAL] Large objects system

2013-10-04 Thread Albe Laurenz
Rafael B.C. wrote: I am dealing with the old decision about hiw to store data objects and trying to understand deep the postgre system including toast, pg-largedataobject table and so on. My real doubt right now is why bytea does not gets processed by toast system even when is grow

Re: [GENERAL] Large objects system

2013-10-04 Thread John R Pierce
On 10/3/2013 2:22 AM, Rafael B.C. wrote: My real doubt right now is why bytea does not gets processed by toast system even when is grow enough. Since ive read that tuples are not allowed to expand over several dtabase pages. a tuple can't expand over ONE database page, and generally it

Re: [GENERAL] pgbench

2013-10-04 Thread Simeó Reig
A 2013-10-03 17:50, Alvaro Herrera escrigué: Giuseppe Broccolo wrote: The format of the script file has to be one SQL command per line; multiline SQL commands are not supported, and empty lines are ignored. This could bring to errors. Could this be your case? Multiline SQL commands are not

Re: [GENERAL] pg_xlog size growing untill it fills the partition

2013-10-04 Thread Michal TOMA
Hello Alban, Yes I think I'm saturating the HDD IO but the problem is that the only thing that runs on that server is postgres itself. I have two tablespeces one on a SSD software raid 1 another one on a HDD software raid 1. The disk which is saturating is the HDD and the pg_xlog directory is

[GENERAL] Re: [GENERAL] Re: [GENERAL] Help on ṕerformance

2013-10-04 Thread Rémi Cura
Hey short trick : to avoid to use the schema name multiple time (more readable and more easy to re use). You can use the SET search_path gpstracking_device_tracks, public; (see manual here : http://www.postgresql.org/docs/current/static/sql-set.html) Cheers, Rémi-C 2013/10/2 Carlos Eduardo

[GENERAL] [Q] Table aliasing

2013-10-04 Thread Ladislav Lenart
Hello. I have a noob question about table aliases in SQL. Suppose the following query: SELECT * FROM deal WHERE deal.id IN ( SELECT DISTINCT deal.id FROM deal JOIN partner_share ON deal.id = partner_share.deal_id JOIN partner

Re: [GENERAL] [Q] Table aliasing

2013-10-04 Thread Adam Jelinek
I almost always alias my tables by default with something short (Usually 1 - 3 characters), but not my subselects for an in list. In this case I would do d1, d2, ps, and p for the different tables. I then do my best to use the same alias in all my queries. I am also big on formatting the SQL

Re: [GENERAL] [Q] Table aliasing

2013-10-04 Thread David Johnston
Ladislav Lenart wrote * Should I alias one of the references to deal? * The above query works the same both with and without an alias, so is it simply a matter of taste / good practice? * Where can I find more info about this, i.e. when the alias is mandatory and when it is only a

Re: [GENERAL] [Q] Table aliasing

2013-10-04 Thread Ladislav Lenart
On 4.10.2013 15:11, David Johnston wrote: Ladislav Lenart wrote * Should I alias one of the references to deal? * The above query works the same both with and without an alias, so is it simply a matter of taste / good practice? * Where can I find more info about this, i.e. when the alias is

[GENERAL] Reasons to reorder results *within* a transaction?

2013-10-04 Thread Evan Jones
I *know* that without an ORDER BY clause, the database is free to reorder results in any way it likes. However, I recently ran into a case where the *SAME* query was returning results in a different order *within* a single transaction, which surprised me (we fixed it by adding the missing ORDER

Re: [GENERAL] Reasons to reorder results *within* a transaction?

2013-10-04 Thread Kevin Grittner
Evan Jones e...@evanjones.ca wrote: I *know* that without an ORDER BY clause, the database is free to reorder results in any way it likes. However, I recently ran into a case where the *SAME* query was returning results in a different order *within* a single transaction, which surprised me

Re: [GENERAL] Reasons to reorder results *within* a transaction?

2013-10-04 Thread Evan Jones
On Oct 4, 2013, at 13:03 , Kevin Grittner kgri...@ymail.com wrote: That is not a valid assumption. For one thing, the default transaction isolation level is read committed, and at that isolation level you are not guaranteed to even get the same *rows* running the same query twice within the

Re: [GENERAL] Reasons to reorder results *within* a transaction?

2013-10-04 Thread Alvaro Herrera
Evan Jones wrote: I *know* that without an ORDER BY clause, the database is free to reorder results in any way it likes. However, I recently ran into a case where the *SAME* query was returning results in a different order *within* a single transaction, which surprised me (we fixed it by