Re: [GENERAL] How to modify dump files created by pg_dump

2013-06-04 Thread 任洪彩
Hi, Yes, you are right. But -d option not suitable for me. Because our flatform use -C option and -d template1 option to create the database described in the dump file to restore the dump file. The whole command like this: # /opt/nokiasiemens/SS_Postgres/bin/pg_restore -C -h CFPU-0 -p 5433 -U

Re: [GENERAL] vacuum_cost_delay and autovacuum_cost_delay

2013-06-04 Thread Sergey Konoplev
On Tue, Jun 4, 2013 at 5:06 PM, ascot.m...@gmail.com wrote: > if I change the value of "vacuum_cost_delay", what is the impact of it on > autovacuum side? If autovacuum_vacuum_cost_delay is not -1 then autovacuum will use this value, and there will be no effect of changing vacuum_cost_delay on

[GENERAL] vacuum_cost_delay and autovacuum_cost_delay

2013-06-04 Thread ascot.m...@gmail.com
Hi, if I change the value of "vacuum_cost_delay", what is the impact of it on autovacuum side? regards -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] View's plan not taking advantage of WHERE?

2013-06-04 Thread Mike Summers
I have a VIEW that does not appear to take advantage of the WHERE when given the opportunity: db=# explain select * from best_for_sale_layouts; QUERY PLAN A

Re: [GENERAL] Streaming replication with sync slave, but disconnects due to missing WAL segments

2013-06-04 Thread Jeff Janes
On Tue, Jun 4, 2013 at 6:25 AM, wrote: > > Hi all > > I have a question about sync streaming replication. > > I have 2 postgresql 9.1 servers set up with streaming replication. On the > master node the slave is configured as a synchronous standby. I've verified > that pg_stat_replication shows sy

Re: [GENERAL] Foreign Key violated

2013-06-04 Thread Keith Fiske
Apologies for not replying sooner. After a few days, we actually found out the cause was a user turning off all triggers on the table, forcing some data into it to try and solve an RMA issue manually, then turning the triggers back on. This hadn't showed up on any logs, and after finding zero signs

Re: [GENERAL] How to modify dump files created by pg_dump

2013-06-04 Thread Raymond O'Donnell
On 04/06/2013 09:44, 任洪彩 wrote: > Hi, guys > > I have met a problem that do confused me. > > I created a dump file by pg_dump from database named "DBRNWHSB" with > parameters -b -o -Fc -Z 0. > As you know, at the beginning of the dump file contains some SQL > statements for create the database "

[GENERAL] How to modify dump files created by pg_dump

2013-06-04 Thread 任洪彩
Hi, guys I have met a problem that do confused me. I created a dump file by pg_dump from database named "DBRNWHSB" with parameters -b -o -Fc -Z 0. As you know, at the beginning of the dump file contains some SQL statements for create the database "DBRNWHSB". So here comes the question, I w

Re: [GENERAL] More buffers used than a relation's relpages

2013-06-04 Thread Amit Langote
On Tue, Jun 4, 2013 at 10:04 PM, Andres Freund wrote: > On 2013-06-04 11:29:44 +0900, Amit Langote wrote: >> In what cases can a relation use more buffers (in shared memory) than >> its pg_class.relpages? > > relpages is primarily updated by (auto-)vacuum, (auto-)analyze, so it > frequently lags b

[GENERAL] Streaming replication with sync slave, but disconnects due to missing WAL segments

2013-06-04 Thread Mads . Tandrup
Hi all I have a question about sync streaming replication. I have 2 postgresql 9.1 servers set up with streaming replication. On the master node the slave is configured as a synchronous standby. I've verified that pg_stat_replication shows sync_state = sync for the slave node. It all seems to w

Re: [GENERAL] Passing a WHERE clause by trigger to a function

2013-06-04 Thread Melvin Call
Ah, just create user-defined functions that take the ID as a parameter and have the user call them, instead of a trigger function, eh? I think I like that better because I can then have separate update and delete functions, with descriptive names. I can do that, and I guess I was looking at this th

Re: [GENERAL] More buffers used than a relation's relpages

2013-06-04 Thread Andres Freund
On 2013-06-04 11:29:44 +0900, Amit Langote wrote: > In what cases can a relation use more buffers (in shared memory) than > its pg_class.relpages? relpages is primarily updated by (auto-)vacuum, (auto-)analyze, so it frequently lags behind reality in a growing relation. Why do you need an exact va

Re: [GENERAL] Passing a WHERE clause by trigger to a function

2013-06-04 Thread David Johnston
Melvin Call wrote > But I still have a question in that I'd like to know if I can pass the > WHERE clause to the function so it can examine the query? Or will I have > to > test for the potential of acting on more than one row? You can write a function that takes a text/varchar and builds a dynami

Re: [GENERAL] Passing a WHERE clause by trigger to a function

2013-06-04 Thread Melvin Call
Hi David, and thanks for the response! Like you, I think I have already come to the conclusion that to do what I want (to limit view modifications to a single row) will require a more detailed function. And my choice of invalid was definitely incorrect. Thanks for pointing that out. A better term