[GENERAL] update with from

2012-01-23 Thread Sim Zacks
Postgresql 8.2 I want to update a table with a from that has mutliple rows joining to it. According to the docs, this is not advisable because: "If it does, then only one of the join rows will be used to update the target row, but which one will be used is not readily predictable." In my tests,

[GENERAL] xml, xpath,postgres 9.1

2012-01-23 Thread caracan
Hello everybody, sorry for my english. I need to extract the xml: lat, lon and ele. The xml I have it save on a table (gpx.object_value). For the first two works for me: SELECT (xpath ('//lat ', gpx.object_value)) [i] FROM gpx SELECT (xpath ('//lon ', gpx.object_value)) [i] FROM gpx My question

Re: [GENERAL] Best way to create unique primary keys across schemas?

2012-01-23 Thread Chris Angelico
On Mon, Jan 23, 2012 at 11:19 AM, panam wrote: > Hi, > > If I'd like to have primary keys generated ("numeric" style, no UUIDs) that > are unique across schemas is the best option to allocate a fixed sequence > range (min,max) to the sequences of all schemas? You can "share" a sequence object bet

Re: [GENERAL] PGbouncer for Windows 2008

2012-01-23 Thread Hiroshi Saito
Hi. John-san, thanks! to Edison-san. It is necessary to perform it in an administrator's mode. Please see, http://winpg.jp/~saito/pgbouncer/try_64bit/regsvr32_pgevent.png http://winpg.jp/~saito/pgbouncer/try_64bit/running_pgbouncer.png Regards, Hiroshi Saito (2012/01/23 10:09), John R Pierce

Re: [GENERAL] update with from

2012-01-23 Thread Sim Zacks
> In my tests, if the joined rows are sorted it always updates with the > first row. Does anyone have any other experiences, or should I be > concerned that at some point it will behave differently? I checked my tests again. It always uses the last one, not the first one. Sim -- Sent via pgsql

Re: [GENERAL] Is Synchronous Postgresql Replication Slower Than Asynchronous?

2012-01-23 Thread Stuart Bishop
On Sat, Jan 21, 2012 at 3:31 AM, Jerry Richards wrote: > Is synchronous postgresql replication slower than asynchronous?  If so, how > much?  I am looking into database replication for a phone system, so the > response time is of concern. You might want to investigate pgpool-ii. It sits as a prox

Re: [GENERAL] update with from

2012-01-23 Thread Alban Hertroys
On 23 January 2012 14:48, Sim Zacks wrote: >> In my tests, if the joined rows are sorted it always updates with the >> first row. Does anyone have any other experiences, or should I be >> concerned that at some point it will behave differently? > > I checked my tests again. It always uses the last

Re: [GENERAL] Is Synchronous Postgresql Replication Slower Than Asynchronous?

2012-01-23 Thread Simon Riggs
On Mon, Jan 23, 2012 at 2:30 PM, Stuart Bishop wrote: > On Sat, Jan 21, 2012 at 3:31 AM, Jerry Richards > wrote: >> Is synchronous postgresql replication slower than asynchronous?  If so, how >> much?  I am looking into database replication for a phone system, so the >> response time is of concer

Re: [GENERAL] "could not accept SSPI security context"

2012-01-23 Thread G_Hosa_Phat
Ahmed wrote > > Hi, > > In my email, I mistakenly assumed that the next version would be 2.0.12.0, > which was not. My bad. > > I checked the source and confirmed that the 2.0.11.0 has the bug, and the > immediate next version (2.0.11.91) has the fix. You can use the version > 2.0.11.92 >

Re: [GENERAL] Is Synchronous Postgresql Replication Slower Than Asynchronous?

2012-01-23 Thread Stuart Bishop
On Mon, Jan 23, 2012 at 9:37 PM, Simon Riggs wrote: > On Mon, Jan 23, 2012 at 2:30 PM, Stuart Bishop > wrote: >> On Sat, Jan 21, 2012 at 3:31 AM, Jerry Richards >> wrote: >>> Is synchronous postgresql replication slower than asynchronous?  If so, how >>> much?  I am looking into database replic

Re: [GENERAL] update with from

2012-01-23 Thread Adrian Klaver
On Monday, January 23, 2012 2:00:29 am Sim Zacks wrote: > Postgresql 8.2 > > I want to update a table with a from that has mutliple rows joining to > it. According to the docs, this is not advisable because: > "If it does, then only one of the join rows will be used to update the > target row, bu

Re: [GENERAL] update with from

2012-01-23 Thread Sim Zacks
On 01/23/2012 04:34 PM, Alban Hertroys wrote: > On 23 January 2012 14:48, Sim Zacks wrote: >>> In my tests, if the joined rows are sorted it always updates with the >>> first row. Does anyone have any other experiences, or should I be >>> concerned that at some point it will behave differently? >>

Re: [GENERAL] Is Synchronous Postgresql Replication Slower Than Asynchronous?

2012-01-23 Thread Simon Riggs
On Mon, Jan 23, 2012 at 3:13 PM, Stuart Bishop wrote: > On Mon, Jan 23, 2012 at 9:37 PM, Simon Riggs wrote: >> On Mon, Jan 23, 2012 at 2:30 PM, Stuart Bishop >> wrote: >>> On Sat, Jan 21, 2012 at 3:31 AM, Jerry Richards >>> wrote: Is synchronous postgresql replication slower than asynchro

Re: [GENERAL] update with from

2012-01-23 Thread Sim Zacks
On 01/23/2012 05:13 PM, Adrian Klaver wrote: > > I guess the primary question here is, what are you trying to achieve? > Do want a particular row to supply the values to the target table i.e the row > with the most timestamp? > What is the query you are using? > The query returns a partid, unit

Re: [GENERAL] update with from

2012-01-23 Thread Tom Lane
Sim Zacks writes: > I want to update a table with a from that has mutliple rows joining to > it. According to the docs, this is not advisable because: > "If it does, then only one of the join rows will be used to update the > target row, but which one will be used is not readily predictable." Th

[GENERAL] [RFE] auto ORDER BY for SELECT

2012-01-23 Thread Douglas Eric
I'm not sure if this is the right list to discuss this, but, I have a suggestion: ORDER BY clause, as defined in the SELECT documentation says: "If ORDER BY is not given, the rows are returned in whatever order the system finds fastest to produce" This order is usually not wanted, as it is not p

Re: [GENERAL] Schema version control

2012-01-23 Thread Roger Leigh
On Thu, Feb 10, 2011 at 02:58:15PM -0700, Rob Sargent wrote: > On 02/10/2011 02:38 PM, Royce Ausburn wrote: > > My company is having trouble managing how we upgrade schema changes across > > many versions of our software. I imagine this is a common problem and > > there're probably some neat solut

Re: [GENERAL] Schema version control

2012-01-23 Thread Bill Moran
In response to Roger Leigh : > On Thu, Feb 10, 2011 at 02:58:15PM -0700, Rob Sargent wrote: > > On 02/10/2011 02:38 PM, Royce Ausburn wrote: > > > My company is having trouble managing how we upgrade schema changes across > > > many versions of our software. I imagine this is a common problem and

Re: [GENERAL] [RFE] auto ORDER BY for SELECT

2012-01-23 Thread Pavel Stehule
Hello 2012/1/23 Douglas Eric : > I'm not sure if this is the right list to discuss this, but, I have a > suggestion: > > ORDER BY clause, as defined in the SELECT documentation says: > > "If ORDER BY is not given, the rows are returned in whatever order the > system finds fastest to produce" > > T

Re: [GENERAL] [RFE] auto ORDER BY for SELECT

2012-01-23 Thread Andreas Kretschmer
Douglas Eric wrote: > I'm not sure if this is the right list to discuss this, but, I have a > suggestion: > > ORDER BY clause, as defined in the SELECT documentation says: > > "If ORDER BY is not given, the rows are returned in whatever order the system > finds fastest to produce" > > This ord

Re: [GENERAL] [RFE] auto ORDER BY for SELECT

2012-01-23 Thread David Johnston
Piling On. NO! (not that I actually think this would ever happen anyway). Sorting is a resource-intensive process and it should NOT be made into a default. Besides, any kind of intelligent/implicit behavior like that ends up being forgotten and/or changed in the future and previously worki

Re: [GENERAL] update with from

2012-01-23 Thread Adrian Klaver
On Monday, January 23, 2012 7:32:35 am Sim Zacks wrote: > On 01/23/2012 05:13 PM, Adrian Klaver wrote: > > I guess the primary question here is, what are you trying to achieve? > > Do want a particular row to supply the values to the target table i.e the > > row with the most timestamp? > > What is

Re: [GENERAL] update with from

2012-01-23 Thread Adrian Klaver
On Monday, January 23, 2012 7:32:35 am Sim Zacks wrote: > On 01/23/2012 05:13 PM, Adrian Klaver wrote: > > When I throw in code to make the select only return the correct rows > The select statement takes 9 secs by itself: > select a.partid,a.deliverywks > from poparts a where popartid in ( >

Re: [GENERAL] Question about (probably wrong) index scan cost for conditional indexes

2012-01-23 Thread Maxim Boguk
Hi. Seems previous test case not clear demonstrate the problem which i have stuck with. Now much better and close to reality test case: Preparation: set random_page_cost to 4; set seq_page_cost to 1; create table test (id integer primary key, sections integer[], value float); insert into test s

[GENERAL] Incomplete startup packet help needed

2012-01-23 Thread David Johnston
Immediately upon starting the server I get an "incomplete startup packet" log message. Just prior there is an "autovacuum launcher started" message. Any thoughts? David J. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.

Re: [GENERAL] Incomplete startup packet help needed

2012-01-23 Thread John R Pierce
On 01/23/12 4:24 PM, David Johnston wrote: Immediately upon starting the server I get an "incomplete startup packet" log message. Just prior there is an "autovacuum launcher started" message. Any thoughts? based on the given information: something is probably wrong. -- john r pierce

Re: [GENERAL] Incomplete startup packet help needed

2012-01-23 Thread Adrian Klaver
On Monday, January 23, 2012 4:24:50 pm David Johnston wrote: > Immediately upon starting the server I get an "incomplete startup packet" > log message. Just prior there is an "autovacuum launcher started" > message. Do you have other programs connecting to server on startup? > > Any thoughts? >

Re: [GENERAL] Incomplete startup packet help needed

2012-01-23 Thread David Boreham
On 1/23/2012 5:24 PM, David Johnston wrote: Immediately upon starting the server I get an "incomplete startup packet" log message. Just prior there is an "autovacuum launcher started" message. We've found that this message is printed in the log if a client makes a TCP connection to the PG ser

[GENERAL] PG 9.0 EBS Snapshot Backups on Slave

2012-01-23 Thread Andrew Hannon
Hello, I am playing with a script that implements physical backups by snapshotting the EBS-backed software RAID. My basic workflow is this: 1. Stop PG on the slave 2. pg_start_backup on the master 3. On the slave: A. unmount the PG RAID B. snapshot each disk in the raid C. mount the PG

Re: [GENERAL] Incomplete startup packet help needed

2012-01-23 Thread David Johnston
On Jan 23, 2012, at 19:38, Adrian Klaver wrote: > On Monday, January 23, 2012 4:24:50 pm David Johnston wrote: >> Immediately upon starting the server I get an "incomplete startup packet" >> log message. Just prior there is an "autovacuum launcher started" >> message. > > Do you have other prog

Re: [GENERAL] PG 9.0 EBS Snapshot Backups on Slave

2012-01-23 Thread Alan Hodgson
On Monday, January 23, 2012 07:54:16 PM Andrew Hannon wrote: > It is worth noting that, the slave (seemingly) catches up eventually, > recovering later log files with streaming replication current. Can I trust > this state? > Should be able to. The master will also actually retry the logs and eve

Re: [GENERAL] Incomplete startup packet help needed

2012-01-23 Thread David Johnston
GOOD NEWS On Jan 23, 2012, at 20:00, David Johnston wrote: > On Jan 23, 2012, at 19:38, Adrian Klaver wrote: > >> On Monday, January 23, 2012 4:24:50 pm David Johnston wrote: >>> Immediately upon starting the server I get an "incomplete startup packet" >>> log message. Just prior there is an

Re: [GENERAL] Incomplete startup packet help needed

2012-01-23 Thread Adrian Klaver
On Monday, January 23, 2012 5:00:17 pm David Johnston wrote: > On Jan 23, 2012, at 19:38, Adrian Klaver wrote: > > On Monday, January 23, 2012 4:24:50 pm David Johnston wrote: > >> Immediately upon starting the server I get an "incomplete startup > >> packet" log message. Just prior there is an "

Re: [GENERAL] update with from

2012-01-23 Thread Sim Zacks
On 01/23/2012 07:10 PM, Adrian Klaver wrote: > On Monday, January 23, 2012 7:32:35 am Sim Zacks wrote: >> On 01/23/2012 05:13 PM, Adrian Klaver wrote: > >> >> When I throw in code to make the select only return the correct rows >> The select statement takes 9 secs by itself: >> select a.partid,a.d