Re: [GENERAL] partitioned table + postgres_FDW not working in 9.3

2013-09-25 Thread Shigeru Hanada
Hi Lonni, 2013/9/25 Lonni J Friedman : > The problem that I'm experiencing is if I attempt to perform an INSERT > on the foreign nppsmoke table on cluster a, it fails claiming that the > table partition which should hold the data in the INSERT does not > exist: > > ERROR: relation "nppsmoke_2013_

Re: [GENERAL] Deduplication and transaction isolation level

2013-09-25 Thread DDT
Is your table have only pkey one field and the sql is the exact same sql you use? If you have more than one field to insert, DISTINCT ensure the whole row values set are distinct instead of one field value. that't maybe a reason for your situation. -- Original --

Re: [GENERAL] how to tell master from replica

2013-09-25 Thread Scott Ribe
On Sep 25, 2013, at 6:13 PM, Michael Paquier wrote: > "SELECT pg_is_in_recovery();" can be used to make the difference > between a master and a slave. Exactly what I need; thanks. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgs

Re: [GENERAL] how to tell master from replica

2013-09-25 Thread bricklen
On Wed, Sep 25, 2013 at 5:11 PM, bricklen wrote: > > On Wed, Sep 25, 2013 at 4:53 PM, Scott Ribe > wrote: > >> Assuming a master & replica set up using streaming replication, hot >> standby, 9.3. >> >> I'd like to have a single script on both machines distinguish whether >> it's running on the m

Re: [GENERAL] how to tell master from replica

2013-09-25 Thread Michael Paquier
On Thu, Sep 26, 2013 at 8:53 AM, Scott Ribe wrote: > Assuming a master & replica set up using streaming replication, hot standby, > 9.3. > > I'd like to have a single script on both machines distinguish whether it's > running on the machine with the master or replica, and take different actions

Re: [GENERAL] how to tell master from replica

2013-09-25 Thread bricklen
On Wed, Sep 25, 2013 at 4:53 PM, Scott Ribe wrote: > Assuming a master & replica set up using streaming replication, hot > standby, 9.3. > > I'd like to have a single script on both machines distinguish whether it's > running on the machine with the master or replica, and take different > actions

[GENERAL] how to tell master from replica

2013-09-25 Thread Scott Ribe
Assuming a master & replica set up using streaming replication, hot standby, 9.3. I'd like to have a single script on both machines distinguish whether it's running on the machine with the master or replica, and take different actions accordingly. Is the way to do this to check for the presenc

Re: [GENERAL] postgres FDW doesn't support sequences?

2013-09-25 Thread Lonni J Friedman
On Wed, Sep 25, 2013 at 2:47 PM, Tom Lane wrote: > Lonni J Friedman writes: >> If I INSERT a new row into the local table (not the foreign table >> version), without specifying the 'id' column explicitly, it >> automatically is assigned the nextval in the sequence counter. >> However, if I attemp

Re: [GENERAL] postgres FDW doesn't support sequences?

2013-09-25 Thread Tom Lane
Lonni J Friedman writes: > If I INSERT a new row into the local table (not the foreign table > version), without specifying the 'id' column explicitly, it > automatically is assigned the nextval in the sequence counter. > However, if I attempt to run the same INSERT using the foreign table, > it a

Re: [GENERAL] Deduplication and transaction isolation level

2013-09-25 Thread Merlin Moncure
On Wed, Sep 25, 2013 at 12:50 PM, Steven Schlansker wrote: > > On Sep 25, 2013, at 6:04 AM, Merlin Moncure wrote: > >> On Tue, Sep 24, 2013 at 10:19 PM, François Beausoleil >> wrote: >>> Hi all! >>> >>> I import many, many rows of data into a table, from three or more >>> computers, 4 times per

Re: [GENERAL] Deduplication and transaction isolation level

2013-09-25 Thread Steven Schlansker
On Sep 25, 2013, at 6:04 AM, Merlin Moncure wrote: > On Tue, Sep 24, 2013 at 10:19 PM, François Beausoleil > wrote: >> Hi all! >> >> I import many, many rows of data into a table, from three or more computers, >> 4 times per hour. I have a primary key, and the query I use to import the >> da

Re: [GENERAL] streaming replication not working

2013-09-25 Thread John DeSoi
On Sep 25, 2013, at 8:36 AM, Guillaume Lelarge wrote: > Your config file and your debug logs don't match. Your config file says > that the restore command is rsync, but your logs say its pg_standby. > > Check if you have a pg_standby process on the slave. That would explain > why the slave neve

Re: [GENERAL] Incorrect password when restarting a cluster

2013-09-25 Thread Stuart Bishop
On Wed, Sep 25, 2013 at 5:13 PM, Hombakazi Cynthia Jozela wrote: > Hello Community > > I am new in Postgresql, and I used a "one click graphic installer", and > installed on Ubuntu and I need some assistance: > > I would like to be advised on what I need to do when restarting a cluster as > I am g

[GENERAL] Problem with updating hstore extension from 9.2 to 9.3

2013-09-25 Thread Murat Kabilov
Hello, I've just upgraded my database from 9.2.2 to 9.3.0 using pg_upgrade. Besides I've updated hstore extension ("alter extension hstore update"). But I can't find new to 9.2 hstore functions such as "hstore_to_json" in my database. I found out that file "contrib/hstore/hstore.control" of pg 9.

Re: [GENERAL] Deduplication and transaction isolation level

2013-09-25 Thread François Beausoleil
Le 2013-09-25 à 09:04, Merlin Moncure a écrit : > On Tue, Sep 24, 2013 at 10:19 PM, François Beausoleil > wrote: >> Hi all! >> >> I import many, many rows of data into a table, from three or more computers, >> 4 times per hour. I have a primary key, and the query I use to import the >> data i

Re: [GENERAL] Incorrect password when restarting a cluster

2013-09-25 Thread rob stone
On Wed, 2013-09-25 at 03:13 -0700, Hombakazi Cynthia Jozela wrote: > Hello Community > > I am new in Postgresql, and I used a "one click graphic installer", > and installed on Ubuntu and I need some assistance: > > I would like to be advised on what I need to do when restarting a > cluster as

[GENERAL] postgres FDW doesn't support sequences?

2013-09-25 Thread Lonni J Friedman
I've got two 9.3 clusters, with a postgres foreign data wrapper (FDW) setup to point from one cluster to the other. One of the (foreign) tables associated with the foreign server has a bigint sequence for its primary key, defined as: id | bigint | not null default

Re: [GENERAL] 回复:[GENERAL] SP to calc shipments vs receipts

2013-09-25 Thread Bret Stern
On Wed, 2013-09-25 at 07:46 -0700, Chris Travers wrote: > > > > On Wed, Sep 25, 2013 at 7:27 AM, DDT <410845...@qq.com> wrote: > By the way, you can try to save the current totals to another > table. > update it through triggers when the inventory transactions > c

[GENERAL] Re: [GENERAL] ??????[GENERAL] SP to calc shipments vs receipts

2013-09-25 Thread DDT
thanks. -- Original -- From: "Chris Travers";; Date: Wed, Sep 25, 2013 10:46 PM To: "DDT"<410845...@qq.com>; Cc: "bret_stern"; "pgsql-general"; Subject: Re: [GENERAL] ??[GENERAL] SP to calc shipments vs receipts On Wed, Sep 25, 2013 at 7:27 AM,

[GENERAL] Re: 回复:[GENERAL] SP to calc shipments vs receipts

2013-09-25 Thread Bret Stern
I like that idea. Also thinking of creating two ALLOCATE transactions. ALLO (Allocate Open) ALLC (Allocate Closed) after allocation has been shipped. This way I can still see the original allocation and allocation ship transactions when running a movement report, but only use ALLO to determine a

[GENERAL] Re: [GENERAL] 回复:[GENERAL] SP to calc shipments vs receipts

2013-09-25 Thread Chris Travers
On Wed, Sep 25, 2013 at 7:27 AM, DDT <410845...@qq.com> wrote: > By the way, you can try to save the current totals to another table. > update it through triggers when the inventory transactions changed. > it may lead to better performance on a large set of inventory transactions > for query curre

[GENERAL] ??????[GENERAL] SP to calc shipments vs receipts

2013-09-25 Thread DDT
By the way, you can try to save the current totals to another table. update it through triggers when the inventory transactions changed. it may lead to better performance on a large set of inventory transactions for query current totals - Think I'll just do an UPDATE which changes

Re: [GENERAL] streaming replication not working

2013-09-25 Thread Guillaume Lelarge
On Tue, 2013-09-24 at 08:59 -0500, John DeSoi wrote: > On Sep 24, 2013, at 5:48 AM, Albe Laurenz wrote: > > >> Here is what I have on the standby: > >> > >> postgresql.conf > >> > >> hot_standby = on > >> max_wal_senders = 2 > >> wal_level = hot_standby > > > > You should set the same paramete

Re: [GENERAL] Deduplication and transaction isolation level

2013-09-25 Thread Merlin Moncure
On Tue, Sep 24, 2013 at 10:19 PM, François Beausoleil wrote: > Hi all! > > I import many, many rows of data into a table, from three or more computers, > 4 times per hour. I have a primary key, and the query I use to import the > data is supposed to dedup before inserting, but I still get primar

Re: [GENERAL] reading cvs logs with pgadmin queries

2013-09-25 Thread Dave Cramer
Ok, I found the offending line. It was not the pgadmin line. There was a line with a large binary insert. Dave Cramer dave.cramer(at)credativ(dot)ca http://www.credativ.ca On Mon, Sep 23, 2013 at 6:31 PM, Adrian Klaver wrote: > On 09/23/2013 12:46 PM, Dave Cramer wrote: > >> OK, >> >> I have a

[GENERAL] Incorrect password when restarting a cluster

2013-09-25 Thread Hombakazi Cynthia Jozela
Hello Community I am new in Postgresql, and I used a "one click graphic installer", and   installed on Ubuntu and I need some assistance: I would like to be advised on what I need to do when restarting a cluster as I am getting a password error when I try to. These are the steps I took: hombaka

Re: [GENERAL] logging statements in PostgreSQL

2013-09-25 Thread Jayadevan M
Thanks for the pointer. I do not really want to log the plans of queries, just the queries, execution time and a couple of other details (database,user). If I use the auto-explain module, it will end up printing the plan for all query execution in the log files? On Wed, Sep 25, 2013 at 1:43 PM, A

Re: [GENERAL] logging statements in PostgreSQL

2013-09-25 Thread Amit Langote
On Wed, Sep 25, 2013 at 12:18 PM, Jayadevan M wrote: > Hi all, > I am planning to use pgbadger for analyzing queries. Documentation for > pgbadger says "Do not enable log_statement as their log format will not be > parsed by pgBadger. " > I have > log_min_duration_statement = 0 > I do see quite a