Re: PostgreSQL intenal scheduler?

2018-09-05 Thread Thiemo Kellner
Thanks for the hint. Your solution seems to be good. However, I am designing my framework for fun, to give back something to the community and because I think it's time that historisation is not reinvented and reimplemented again and again. Having that said, I think I can get rid of the nee

Re: Async replication: how to get an alert on failure

2018-09-05 Thread pavan95
Hi Karl, Hope my mail finds you in good time. >I wrote a small program that goes to each of the servers in the replication group and checks its status on the log, computes the difference, and if off by more than "X" bytes prints a notification. Did you configure ssh ?? >If this is run from th

How to install pgAgent on windows for postresql-bigsql-10.5

2018-09-05 Thread jimmy
I use PostgreSQL-10.5-1-win64-bigsql.exe to install postgresql database. How to install pgAgent on windows for postresql-bigsql-10.5. I have been searching some articles to install pgAgent. But they do not work. I found there has not any version of pgAgent for windows in the website 'www.pgadmin.o

Re: PostgreSQL intenal scheduler?

2018-09-05 Thread Jeremy Finzel
If I follow your use case, we have written something that just may fit your scenario and plan to open source it rather soon. It has several layers but let me boil it down. First we use an open sourced auditing system to log changes to the source tables. This becomes your queue. A postgres backgrou

Re: PostgreSQL intenal scheduler?

2018-09-05 Thread Thiemo Kellner
Because I am looking for a fifo queue and not for time schedule. Thanks anyway. Quoting Tim Clarke : Why not just call your "do a scheduled run" code from cron? Tim Clarke

Re: PostgreSQL intenal scheduler?

2018-09-05 Thread Thiemo Kellner
This is a queue but if I am not mistaken, it is outside PostgreSQL where to go I am very reluctant. I will look at it in more depth. Thanks! Quoting Ron : Maybe https://github.com/chanks/que is what you need. On 09/05/2018 02:35 PM, Thiemo Kellner wrote: I have seen pg_cron but it is not w

Re: PostgreSQL intenal scheduler?

2018-09-05 Thread Ron
Maybe https://github.com/chanks/que is what you need. On 09/05/2018 02:35 PM, Thiemo Kellner wrote: I have seen pg_cron but it is not what I am looking for. It schedules tasks only by time. I am looking for a fifo queue. pg_cron neither prevents from simultaneous runs I believe. Quoting Tho

Re: PostgreSQL intenal scheduler?

2018-09-05 Thread Tim Clarke
On 05/09/18 16:06, Thiemo Kellner wrote: > > Hi all > > I am designing a framework for historisation implementation (SCD). One > feature I would like to provide is a table in that the actual state of > an entity is put and if this is complete, this history table is > "updated": > >   --

Re: PostgreSQL intenal scheduler?

2018-09-05 Thread Thiemo Kellner
I have seen pg_cron but it is not what I am looking for. It schedules tasks only by time. I am looking for a fifo queue. pg_cron neither prevents from simultaneous runs I believe. Quoting Thomas Kellerer : There is no built-in scheduler, but there is an extension that supplies that https:/

Re: Max number of WAL files in pg_xlog directory for Postgres 9.2 version

2018-09-05 Thread Andreas Kretschmer
Am 05.09.2018 um 19:39 schrieb Raghavendra Rao J S V: Hi All, We are using postgres 9.2 verstion database. 9.2 is out of support. Please consider a upgrade. soon! Please let me know, how many max number of wal files in pg_xlog directory? depends on the workload and on several settings.

Re: Max number of WAL files in pg_xlog directory for Postgres 9.2 version

2018-09-05 Thread Ron
On 09/05/2018 12:39 PM, Raghavendra Rao J S V wrote: Hi All, We are using postgres 9.2 verstion database. Please let me know, how many max number of wal files in pg_xlog directory? What is the formul. I am seeing different formulas. Could you provide me which decides number of max WAL files i

Re: unaccent(text) fails depending on search_path (WAS: pg_upgrade fails saying function unaccent(text) doesn't exist)

2018-09-05 Thread Tom Lane
Gunnlaugur Thor Briem writes: > SET search_path = "$user"; SELECT public.unaccent('foo'); > SET > ERROR: text search dictionary "unaccent" does not exist Meh. I think we need the attached, or something just about like it. It's barely possible that there's somebody out there who's relying on se

Re: scram-sha-256 authentication broken in FIPS mode

2018-09-05 Thread Michael Paquier
On Wed, Sep 05, 2018 at 01:19:39PM +, Alessandro Gherardi wrote: > Hi Michael,I'm actually running postgres on Windows. First you may want to avoid top-posting. This is not the style of the community lists and this breaks the logic of a thread. > I added code to fe-secure-openssl.c and be-se

Re: Autovacuum degrades all other operations by keeping all buffers dirty?

2018-09-05 Thread David Pacheco
On Fri, Aug 31, 2018 at 3:50 PM, Andres Freund wrote: > On 2018-08-31 19:31:47 -0300, Alvaro Herrera wrote: > > On 2018-Aug-31, David Pacheco wrote: > > > > > From reading the 9.6.3 source, it looks like the autovacuum process > > > itself is single-threaded, and it reads pages essentially linear

Re: Full table lock dropping a foreign key

2018-09-05 Thread Tom Lane
Paul Jungwirth writes: > I noticed that Postgres takes an AccessExclusiveLock (a lock on the > whole table) against the *referenced* table when dropping a foreign key. Yeah, that's because it involves removing a trigger. Adding a trigger used to require AEL as well, but it was successfully arg

RE: Max number of WAL files in pg_xlog directory for Postgres 9.2 version

2018-09-05 Thread Johnes Castro
1 wal by default occupies 16MB. The parameter in version 9.2 that controls this is: wal_keep_segments By setting the parameter to 10, the maximum size of the US pg_xlog will be 160MB. Best Regards, Johnes Castro De: Johnes Castro Enviado: quarta-feira, 5 de s

RE: Max number of WAL files in pg_xlog directory for Postgres 9.2 version

2018-09-05 Thread Johnes Castro
Hi, This page in the documentation can help you. https://www.postgresql.org/docs/9.2/static/wal-configuration.html Best Regards, Johnes Castro PostgreSQL: Documentation: 9.2: WAL Configuration 29.4. WAL Configuration. There are s

Max number of WAL files in pg_xlog directory for Postgres 9.2 version

2018-09-05 Thread Raghavendra Rao J S V
Hi All, We are using postgres 9.2 verstion database. Please let me know, how many max number of wal files in pg_xlog directory? What is the formul. I am seeing different formulas. Could you provide me which decides number of max WAL files in PG_XLOG directory for Postgres 9.2 Database,please?

Re: increasing HA

2018-09-05 Thread Dimitri Maziuk
On 09/05/2018 12:04 PM, Thomas Poty wrote: > I want to get : > Automatic failover (promoting a slave) > Automatic Routing traffic to master > Fencing in case of node failure. Why would you want to fence a node that's already failed? -- You want to fence off the master during the failover so it doe

Re: increasing HA

2018-09-05 Thread Nicolas Karolak
I have a setup kind of like yours, one primary and two stanby, but with streaming replication. Here is what i use: -> on application (Django webapp) servers: |---> a local HAProxy as a frontend for database servers, doing the fencing through a check on a custom daemon running on database servers -

Re: increasing HA

2018-09-05 Thread Thomas Poty
I want to get : Automatic failover (promoting a slave) Automatic Routing traffic to master Fencing in case of node failure. I already have 2 asynchronous slaves in hot standby mode + Replication slot. I don't want to add a new node. Le mer. 5 sept. 2018 à 18:39, Dmitri Maziuk a écrit : > On W

Re: increasing HA

2018-09-05 Thread Dmitri Maziuk
On Wed, 5 Sep 2018 17:45:05 +0200 Thomas Poty wrote: > We have one master and 2 slaves so 3 nodes So what is the "HA" that you're trying to "increase"? Are you adding a 3rd slave? A 2nd master? A hot standby? All of the above? -- Dmitri Maziuk

Full table lock dropping a foreign key

2018-09-05 Thread Paul Jungwirth
Hello, I noticed that Postgres takes an AccessExclusiveLock (a lock on the whole table) against the *referenced* table when dropping a foreign key. I wasn't expecting that, and some experimentation showed it does *not* take one when creating the FK. For example: pjtest=# create table parent

Re: increasing HA

2018-09-05 Thread Thomas Poty
> How many nodes do you want run? Keep in mind that with only 2 nodes, fencing off the right one is by definition an undecidable problem. That's one of the features of the current linux HA stack that makes one want to go BSD/CARP. > > And if you want to run fully distributed, you might want to look

Re: PostgreSQL intenal scheduler?

2018-09-05 Thread Thomas Kellerer
Thiemo Kellner schrieb am 05.09.2018 um 17:06: > I am designing a framework for historisation implementation (SCD). > One feature I would like to provide is a table in that the actual > state of an entity is put and if this is complete, this history table > is "updated": > >  

PostgreSQL intenal scheduler?

2018-09-05 Thread Thiemo Kellner
Hi all I am designing a framework for historisation implementation (SCD). One feature I would like to provide is a table in that the actual state of an entity is put and if this is complete, this history table is "updated": - ==> | ENTITY_ACT | =

Re: increasing HA

2018-09-05 Thread Dmitri Maziuk
On Wed, 5 Sep 2018 13:23:41 +0200 Thomas Poty wrote: > At first glance, i may use for automatic failover PAF, a proxy HAproxy and > for fencincg, i am a bit disappointed, i don't know what to do/use How many nodes do you want run? Keep in mind that with only 2 nodes, fencing off the right one i

Re: unaccent(text) fails depending on search_path (WAS: pg_upgrade fails saying function unaccent(text) doesn't exist)

2018-09-05 Thread Gunnlaugur Thor Briem
Yep, a neater workaround for sure! Cheers, Gulli On Wed, Sep 5, 2018 at 2:00 PM Adrian Klaver wrote: > On 09/05/2018 01:49 AM, Gunnlaugur Thor Briem wrote: > > OK, I found the cause of the unaccent dictionary problem, and a > workaround. > > > > It's not the vacuumdb version, not the unaccent v

Re: increasing HA

2018-09-05 Thread Thomas Poty
> OK, so either patch PAF yourself (not recommended) or choose something > else. Note that two other ways are working with Pacemaker: > * the pgsql resource agent (see FAQ of PAF) > * a shared disk architecture (no pgsql replication) Probably, i will be interested by the solution "patroni-etcd-

Re: unaccent(text) fails depending on search_path (WAS: pg_upgrade fails saying function unaccent(text) doesn't exist)

2018-09-05 Thread Adrian Klaver
On 09/05/2018 01:49 AM, Gunnlaugur Thor Briem wrote: OK, I found the cause of the unaccent dictionary problem, and a workaround. It's not the vacuumdb version, not the unaccent version, and it's not even a pg_upgrade problem: I get this error also with PG 9.4.18 running on the old cluster, wit

Re: increasing HA

2018-09-05 Thread Jehan-Guillaume (ioguix) de Rorthais
On Wed, 5 Sep 2018 15:06:21 +0200 Thomas Poty wrote: > > In fact, PAF does not support slots. So it is not a good candidate if > > slot are a requirement. > Effectively slots are a requirement we prefer to keep OK, so either patch PAF yourself (not recommended) or choose something else. Note

Re: scram-sha-256 authentication broken in FIPS mode

2018-09-05 Thread Alessandro Gherardi
Hi Michael,I'm actually running postgres on Windows. I added code to fe-secure-openssl.c and be-secure-openssl.c that reads the Windows "standard" FIPS registry entry, and if FIPS is enabled calls FIPS_mode_set(1). This is to mimic to behavior of the .NET framework. Below is the code I added to f

Re: increasing HA

2018-09-05 Thread Thomas Poty
> In fact, PAF does not support slots. So it is not a good candidate if slot are > a requirement. Effectively slots are a requirement we prefer to keep > > a proxy HAproxy and > > for fencincg, i am a bit disappointed, i don't know what to do/use > Depend on your hardware or your virtualization t

Re: increasing HA

2018-09-05 Thread Jehan-Guillaume (ioguix) de Rorthais
On Wed, 5 Sep 2018 13:23:41 +0200 Thomas Poty wrote: > Hi Jehan-Guillaume, Hello, > Thanks for your opinion. > > At first glance, i may use for automatic failover PAF, In fact, PAF does not support slots. So it is not a good candidate if slot are a requirement. > a proxy HAproxy and > for f

Re: increasing HA

2018-09-05 Thread Thomas Poty
Hi Jehan-Guillaume, Thanks for your opinion. At first glance, i may use for automatic failover PAF, a proxy HAproxy and for fencincg, i am a bit disappointed, i don't know what to do/use How about you, do you have any preference about tools/solutions to use ? now, I am aware that i will have to

Re: increasing HA

2018-09-05 Thread Jehan-Guillaume (ioguix) de Rorthais
Hi all, On Tue, 4 Sep 2018 15:09:51 + ROS Didier wrote: > Hi >I have made a lot of PostgreSQL High Availability tests (more > than 20 by solution) and the two following products respond well to the need : > > (1)Repmgr (2ndQuadrant) > > (2)Pglookout (aiven) Both so

unaccent(text) fails depending on search_path (WAS: pg_upgrade fails saying function unaccent(text) doesn't exist)

2018-09-05 Thread Gunnlaugur Thor Briem
OK, I found the cause of the unaccent dictionary problem, and a workaround. It's not the vacuumdb version, not the unaccent version, and it's not even a pg_upgrade problem: I get this error also with PG 9.4.18 running on the old cluster, with both the 10.5 vacuumdb and the 9.4.18 vacuumdb, and I g