Re: Question on postgresql.conf

2018-08-01 Thread Steven Lembark
On Tue, 31 Jul 2018 00:02:47 -0500 (PET) Alvaro Aguayo Garcia-Rada wrote: > Hi. > > As far as I know, it's not currently possible. Maybe recompiling, but > that could not be the best for production environment. I suppose this > is this way becuase postgres is designed to expect a certain folder

Adding terminal title support for psqlrc

2018-08-01 Thread ik
Hello, Is there a way to add terminal title information for psqlrc that cn display what schema I am, operation that is execute and stuff like that? Thank you

Template0 datfrozenxid age is 160million and progressing

2018-08-01 Thread Rijo Roy
Hello Everyone,  I am observing a steady increase in age(datfrozenxid) of template0 database in my Postgresql 10 running in a RHEL 6.9Currently, it is at 166846989 and I am not able to vacuum the same as datallowconn is false. Thought of setting it to true and perform a vacuum freeze on the same

Re: Adding terminal title support for psqlrc

2018-08-01 Thread Adrian Klaver
On 08/01/2018 01:52 AM, ik wrote: Hello, Is there a way to add terminal title information for psqlrc that cn display what schema I am, operation that is execute and stuff like that? Are you referring to the title bar for something like an Konsole? If so then no. If not then what title are y

Re: Adding terminal title support for psqlrc

2018-08-01 Thread Tom Lane
ik writes: > Is there a way to add terminal title information for psqlrc that cn display > what schema I am, operation that is execute and stuff like that? Most terminal programs recognize escape sequences to set the window title. So you could set values for PROMPTn that cause updates in the tit

Re: Template0 datfrozenxid age is 160million and progressing

2018-08-01 Thread Tom Lane
Rijo Roy writes: > I am observing a steady increase in age(datfrozenxid) of template0 database > in my Postgresql 10 running in a RHEL 6.9Currently, it is at 166846989 and I > am not able to vacuum the same as datallowconn is false. Thought of setting > it to true and perform a vacuum freeze on

Re: Settings for fast restores

2018-08-01 Thread Vick Khera
On Wed, Aug 1, 2018 at 2:03 AM, Ron wrote: > Hi, > > http://www.databasesoup.com/2014/09/settings-for-fast-pgrestore.html > > shared_buffers = 1/2 of what you'd usually set > maintenance_work_mem = 1GB-2GB > wal_level = minimal > full_page_writes = off > wal_buffers = 64MB > checkpoint_segments =

Re: Template0 datfrozenxid age is 160million and progressing

2018-08-01 Thread Rijo Roy
Hi Tom,  Thanks for the advice. Autovacuum is disabled in the environment and I cannot take a call on enabling it back. I can only run manual vacuum on the database as the dev team fears autoanalyze changing the query performance. Do you still think we don't need to take any actions.  Thanks, Ri

Re: Template0 datfrozenxid age is 160million and progressing

2018-08-01 Thread Tom Lane
Rijo Roy writes: > Thanks for the advice. Autovacuum is disabled in the environment and I cannot > take a call on enabling it back. I can only run manual vacuum on the database > as the dev team fears autoanalyze changing the query performance. Do you > still think we don't need to take any act

Re: Template0 datfrozenxid age is 160million and progressing

2018-08-01 Thread Rijo Roy
I agree.. But unfortunately it is the business call and we cannot alter it.. I am planning to convince them by keeping autovacuum_analyze_threshold to a high value so that auto analyse will not kick in very often leaving the autovacuum to do its job.. Please advise.  Thanks, Rijo Roy  Sent from

Re: Settings for fast restores

2018-08-01 Thread Ron
On 08/01/2018 09:11 AM, Vick Khera wrote: On Wed, Aug 1, 2018 at 2:03 AM, Ron > wrote: Hi, http://www.databasesoup.com/2014/09/settings-for-fast-pgrestore.html shared_buffers

Weird behaviour of the planner

2018-08-01 Thread Guillaume Lelarge
Hi, While working on a slow query of one of our customers, I found this behaviour which seems quite weird to me. Here it is: (no changes on any parameter) EXPLAIN (ANALYZE) SELECT DISTINCT * FROM gleu2; QUERY PLAN ---

Re: Template0 datfrozenxid age is 160million and progressing

2018-08-01 Thread David Rowley
On 2 August 2018 at 02:31, Rijo Roy wrote: > I agree.. But unfortunately it is the business call and we cannot alter it.. > I am planning to convince them by keeping autovacuum_analyze_threshold to a > high value so that auto analyse will not kick in very often leaving the > autovacuum to do its j

Re: ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .

2018-08-01 Thread Achilleas Mantzios
On 30/07/2018 17:00, Tom Lane wrote: Achilleas Mantzios writes: On 30/07/2018 16:51, Tom Lane wrote: Hm, that's not happening for me: You (and Adrian) are right. This is due to our own tweaking (which I had forgotten). Sorry for the false alarm. It looks like your hack was to work around th

Re: Weird behaviour of the planner

2018-08-01 Thread David Rowley
On 2 August 2018 at 02:48, Guillaume Lelarge wrote: > EXPLAIN (ANALYZE) SELECT DISTINCT * FROM gleu2; > >QUERY PLAN > - > Uni

Re: Weird behaviour of the planner

2018-08-01 Thread Guillaume Lelarge
2018-08-01 16:59 GMT+02:00 David Rowley : > On 2 August 2018 at 02:48, Guillaume Lelarge > wrote: > > EXPLAIN (ANALYZE) SELECT DISTINCT * FROM gleu2; > > > >QUERY PLAN > > > --

Re: ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .

2018-08-01 Thread Tom Lane
Achilleas Mantzios writes: > On 30/07/2018 17:00, Tom Lane wrote: >> It looks like your hack was to work around the bug that was fixed >> properly in 742869946. You should be able to undo that now ... > On pgsql 10.4 , I reverted (undid) this patch/hack : > -   GUC_LIST_INPU

Re: Template0 datfrozenxid age is 160million and progressing

2018-08-01 Thread Andres Freund
Hi, On 2018-08-01 10:24:24 -0400, Tom Lane wrote: > Rijo Roy writes: > > Thanks for the advice. Autovacuum is disabled in the environment and I > > cannot take a call on enabling it back. I can only run manual vacuum on the > > database as the dev team fears autoanalyze changing the query perfo

Re: Template0 datfrozenxid age is 160million and progressing

2018-08-01 Thread Tom Lane
Andres Freund writes: > On 2018-08-01 10:24:24 -0400, Tom Lane wrote: >> IMO, the action you need to take is enabling autovacuum. We've >> seen many many people go down the path you are taking, and it's >> generally led to no good in the end. Manual vacuuming tends >> to miss stuff, and it canno

Re: Template0 datfrozenxid age is 160million and progressing

2018-08-01 Thread Andres Freund
On 2018-08-01 12:07:16 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2018-08-01 10:24:24 -0400, Tom Lane wrote: > >> IMO, the action you need to take is enabling autovacuum. We've > >> seen many many people go down the path you are taking, and it's > >> generally led to no good in the end

Re: Template0 datfrozenxid age is 160million and progressing

2018-08-01 Thread Alvaro Herrera
On 2018-Aug-01, Andres Freund wrote: > On 2018-08-01 12:07:16 -0400, Tom Lane wrote: > > Andres Freund writes: > > > On 2018-08-01 10:24:24 -0400, Tom Lane wrote: > > >> IMO, the action you need to take is enabling autovacuum. We've > > >> seen many many people go down the path you are taking, a

Re: Template0 datfrozenxid age is 160million and progressing

2018-08-01 Thread Andres Freund
On 2018-08-01 12:20:15 -0400, Alvaro Herrera wrote: > On 2018-Aug-01, Andres Freund wrote: > > > On 2018-08-01 12:07:16 -0400, Tom Lane wrote: > > > Andres Freund writes: > > > > On 2018-08-01 10:24:24 -0400, Tom Lane wrote: > > > >> IMO, the action you need to take is enabling autovacuum. We've

Re: Template0 datfrozenxid age is 160million and progressing

2018-08-01 Thread Vik Fearing
On 01/08/18 18:36, Andres Freund wrote: > It's really annoying to > get a hard to kill ant-wraparound autovacuum on an insert only table, > where it's the only thing that'll trigger the autovacuum. Somebody should do something about that. -- Vik Fearing +3

Re: Adding terminal title support for psqlrc

2018-08-01 Thread ik
hi, Thank you, it does not effect the terminal title. As Adrian answered me, it is not supported :/ On Wed, Aug 1, 2018 at 4:47 PM, Tom Lane wrote: > ik writes: > > Is there a way to add terminal title information for psqlrc that cn > display > > what schema I am, operation that is execute

Re: Adding terminal title support for psqlrc

2018-08-01 Thread Adrian Klaver
On 08/01/2018 10:55 AM, ik wrote: hi, Thank you, it does not effect the terminal title. As Adrian answered me, it is not supported :/ I was wrong: https://petereisentraut.blogspot.com/2009/09/how-to-set-xterm-titles-in-psql.html To get this to work in Konsole I had to edit the profile to h

Re: Template0 datfrozenxid age is 160million and progressing

2018-08-01 Thread Stephen Eilert
160 million is a very low number. I manage production databases which reach this value in a day easily. As other said, 200 million is the default threshold for the anti-wraparound vacuums. I wouldn't worry, specially for template0. That said, there is nothing preventing you from temporarily changin

Pg_rewind cannot load history wal

2018-08-01 Thread Richard Schmidt
We have been struggling to get pr_rewind to work. In desperation we have been trying to make the use case as simple as possible:) We have two databases servers running Postgres 10 on two different machine in the normal Primary/Standby configuration. Both machines write their WAL archive logs to

Problem building libpq

2018-08-01 Thread Igor Korot
Hi, I recently updated my compiler going from MSVC 2010 to MSVC 2017. Now I'm trying to re-build the libpq with it. [code] NMAKE : fatal error U1064: MAKEFILE not found and no target specified Stop. C:\Program Files (x86)\Microsoft Visual Studio\2017\Community>cd c:\Users\Igor c:\Users\Igor>nmak

Re: Pg_rewind cannot load history wal

2018-08-01 Thread Abhinav Mehta
Whenever you do switch-over, postgres-wal creates a new timeline, which simplifies managing PITR process. During switch-over(promoting B as master) you had some delta records written to A, that’s where it causes this timeline issue. Now since A had some delta records, it can’t replicate from B

Who and How is responsible for released installations packages and 3rd party packs? (e.g. on https://yum.postgresql.org/9.6/redhat/rhel-7.3-x86_64/)

2018-08-01 Thread Alexandru Lazarev
Hi PG Community, In my company I found that PG Installation on deployed OS Images are takne from here: https://yum.postgresql.org/9.6/redhat/rhel-7.3-x86_64/ We are using PG 9.6.5 or 9.6.7 + pgpool + plv8 + others Some or RPMs for CentOS are taken from that URL (PG Installation, plv8). My quest