Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Sameer Kumar
On Thu, Jul 7, 2016 at 11:37 AM Patrick B wrote: > 2016-07-07 15:19 GMT+12:00 Sameer Kumar : > >> >> >> On Thu, Jul 7, 2016 at 11:02 AM Patrick B >> wrote: >> >>> 2016-07-07 14:55 GMT+12:00 Sameer Kumar

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
2016-07-07 15:19 GMT+12:00 Sameer Kumar : > > > On Thu, Jul 7, 2016 at 11:02 AM Patrick B > wrote: > >> 2016-07-07 14:55 GMT+12:00 Sameer Kumar : >> >>> >>> >>> On Thu, 7 Jul 2016, 10:32 a.m. Patrick B,

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Sameer Kumar
On Thu, Jul 7, 2016 at 11:02 AM Patrick B wrote: > 2016-07-07 14:55 GMT+12:00 Sameer Kumar : > >> >> >> On Thu, 7 Jul 2016, 10:32 a.m. Patrick B, >> wrote: >> >>> The slave02 server will be a copy of the DB into

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
2016-07-07 14:55 GMT+12:00 Sameer Kumar : > > > On Thu, 7 Jul 2016, 10:32 a.m. Patrick B, > wrote: > >> The slave02 server will be a copy of the DB into Amazon. There will be a >> migration to Amazon in the future, and the company's managers

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Sameer Kumar
On Thu, 7 Jul 2016, 10:32 a.m. Patrick B, wrote: > The slave02 server will be a copy of the DB into Amazon. There will be a > migration to Amazon in the future, and the company's managers want a copy > of the current DB there to test and do all the stuffs they need

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
The slave02 server will be a copy of the DB into Amazon. There will be a migration to Amazon in the future, and the company's managers want a copy of the current DB there to test and do all the stuffs they need (migrating to 9.5, too). slave01 is already working as a streaming replication server.

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Sameer Kumar
On Thu, 7 Jul 2016, 10:10 a.m. Patrick B, wrote: > ok... > > I'll archive the wal_files locally on slave01, > How? I assume you are planning on doing this with scp/rsync in archive_command in upstream master. and then send them to slave02 every 10 minutes, for

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread John R Pierce
On 7/6/2016 7:10 PM, Patrick B wrote: I'll archive the wal_files locally on slave01, and then send them to slave02 every 10 minutes, for example. This will be done by rsync or something else. I'll have still the problem with timeline, and slave02 won't be able to become a master in the

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
ok... I'll archive the wal_files locally on slave01, and then send them to slave02 every 10 minutes, for example. This will be done by rsync or something else. I'll have still the problem with timeline, and slave02 won't be able to become a master in the future. Is that right?

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Sameer Kumar
On Thu, 7 Jul 2016, 9:59 a.m. John R Pierce, wrote: > On 7/6/2016 6:52 PM, Sameer Kumar wrote: > > >> the only way to archive the wal_files from a slave into another slave on >> PostgreSQL 9.2, is by using pg_reveivexlog? >> > > Yes. Though I have never tried this myself but

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Sameer Kumar
On Thu, 7 Jul 2016, 9:52 a.m. Sameer Kumar, wrote: > > > On Thu, 7 Jul 2016, 9:51 a.m. Patrick B, wrote: > >> >>> >>> On Thu, 7 Jul 2016, 9:20 a.m. Patrick B, >>> wrote: >>> Hi guys, I got two slaves

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
> > > > a slave doesn't generate wal_files at all. > > if your master is keeping a wal_archive, slaves, including cascaded > streaming slaves, can all use that same archive as their wal source, these > are only used for catchup when streaming is interrupted. > > > so.. is or isn't possible a slave

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread John R Pierce
On 7/6/2016 6:52 PM, Sameer Kumar wrote: the only way to archive the wal_files from a slave into another slave on PostgreSQL 9.2, is by using pg_reveivexlog? Yes. Though I have never tried this myself but going by the theory, it should work. a slave doesn't generate wal_files at

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
ok.. cool... cheers mate! Patrick

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Sameer Kumar
On Thu, 7 Jul 2016, 9:51 a.m. Patrick B, wrote: > >> >> On Thu, 7 Jul 2016, 9:20 a.m. Patrick B, >> wrote: >> >>> Hi guys, >>> >>> I got two slaves using Postgresql 9.2. >>> >>> slave01 - Streaming replication from master >>> slave02 -

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
> > > > On Thu, 7 Jul 2016, 9:20 a.m. Patrick B, wrote: > >> Hi guys, >> >> I got two slaves using Postgresql 9.2. >> >> slave01 - Streaming replication from master >> slave02 - nothing.. new server >> >> is it possible to get slave02 replicating from slave01 (Cascade

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Sameer Kumar
On Thu, 7 Jul 2016, 9:20 a.m. Patrick B, wrote: > Hi guys, > > I got two slaves using Postgresql 9.2. > > slave01 - Streaming replication from master > slave02 - nothing.. new server > > is it possible to get slave02 replicating from slave01 (Cascade streaming >

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
Yep.. thanks for the help!

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread John R Pierce
On 7/6/2016 6:30 PM, Patrick B wrote: Someone from another list told me that wouldn't be possible on the 9.2 version, that's why I asked even that I read that doc... it was new in 9.2, 9.1 didn't support cascading. -- john r pierce, recycling bits in santa cruz

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
Thanks! Someone from another list told me that wouldn't be possible on the 9.2 version, that's why I asked even that I read that doc... cheers

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread John R Pierce
On 7/6/2016 6:18 PM, Patrick B wrote: is it possible to get slave02 replicating from slave01 (Cascade streaming replication) this can be done with streaming ? and also slave01 sending the wal_files to that new slave02?

[GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
Hi guys, I got two slaves using Postgresql 9.2. slave01 - Streaming replication from master slave02 - nothing.. new server is it possible to get slave02 replicating from slave01 (Cascade streaming replication) this can be done with streaming ? and also slave01 sending the wal_files to that new

Re: [GENERAL] Broken after upgrade

2016-07-06 Thread José María Terry Jiménez
El 7/7/16 a las 0:14, Devrim Gündüz escribió: Hi, Fedora packages have an executable (not sure about its name, but check a package called postgresql-upgrade or so). That will help you to finish the upgrade process. Regards, Devrim Hello Yes, the package is called postgresql-upgrade, and

Re: [GENERAL] Broken after upgrade

2016-07-06 Thread Devrim Gündüz
Hi, Fedora packages have an executable (not sure about its name, but check a package called postgresql-upgrade or so). That will help you to finish the upgrade process. Regards, Devrim On July 6, 2016 9:13:50 PM GMT+03:00, arnaud gaboury wrote: >I am left today,

Re: [GENERAL] Broken after upgrade

2016-07-06 Thread Adrian Klaver
On 07/06/2016 02:13 PM, arnaud gaboury wrote: On Wed, Jul 6, 2016 at 8:56 PM, John R Pierce wrote: On 7/6/2016 11:27 AM, Adrian Klaver wrote: First, if possible copy your data dir and conf files somewhere for safety. +1 !!! must be first step. It is the first

[GENERAL] Broken after upgrade

2016-07-06 Thread Jerry LeVan
> I am left today, after an upgrade I think (Fedora 23 --> 24) with a > broken postgresql. > > It used to work very well. The service is started with the systemd > unit file. I have now this error: > > - > postgres@thetradinghall 筐、筐、 systemd/system % >

Re: [GENERAL] Broken after upgrade

2016-07-06 Thread John R Pierce
On 7/6/2016 2:13 PM, arnaud gaboury wrote: pretty much whatever you do, you'll need to install the 9.4 database server >software temporarily in a separate directory, and you'll need to do the >upgrade. So the idea is to downgrade first to 9.4.8 ? I will try this way no, not downgrade, you

Re: [GENERAL] Monitorando WAL Files - PostgreSQL 9.2

2016-07-06 Thread Lucas Possamai
Sorry guys.. wrong email 2016-07-07 9:18 GMT+12:00 Lucas Possamai : > Olá pessoal, tudo bem? > > Sei que no Postgres 9.4 há o pg_stat_archiver para verificar o > arquivamento e as falhas dos wal_files. > > Como posso monitorar isso na versão 9.2? > Vocês tem alguma dica? >

[GENERAL] Monitorando WAL Files - PostgreSQL 9.2

2016-07-06 Thread Lucas Possamai
Olá pessoal, tudo bem? Sei que no Postgres 9.4 há o pg_stat_archiver para verificar o arquivamento e as falhas dos wal_files. Como posso monitorar isso na versão 9.2? Vocês tem alguma dica? Obrigado! Lucas

Re: [GENERAL] Fastest memmove in C

2016-07-06 Thread Alvaro Herrera
FarjadFarid(ChkNet) wrote: > Excellent research and could be well worth checking out. As it could > improve the performance of postgresql engine. 0) We certainly do a lot of memory copying. 1) this work is under the "Code Project Open License" which doesn't look compatible with our Postgres

Re: [GENERAL] Broken after upgrade

2016-07-06 Thread arnaud gaboury
On Wed, Jul 6, 2016 at 8:56 PM, John R Pierce wrote: > On 7/6/2016 11:27 AM, Adrian Klaver wrote: >> >> >> First, if possible copy your data dir and conf files somewhere for safety. > > > +1 !!! must be first step. It is the first thing I did > >> >> From the looks of it

Re: [GENERAL] Broken after upgrade

2016-07-06 Thread John R Pierce
On 7/6/2016 11:27 AM, Adrian Klaver wrote: First, if possible copy your data dir and conf files somewhere for safety. +1 !!! must be first step. From the looks of it Fedora upgraded your Postgres from 9.4.x to 9.5.3. That constitutes a major upgrade and as the error says the data

Re: [GENERAL] Broken after upgrade

2016-07-06 Thread Adrian Klaver
On 07/06/2016 11:13 AM, arnaud gaboury wrote: I am left today, after an upgrade I think (Fedora 23 --> 24) with a broken postgresql. It used to work very well. The service is started with the systemd unit file. I have now this error: - postgres@thetradinghall ➤➤ systemd/system

Re: [GENERAL] Avoid deadlocks on alter table

2016-07-06 Thread Christian Castelli
Hi, by splitting FK contraints, once failed on fk_plan creation while the second time failed on rebuilding public views. I've done a PLPGSQL function that cycles through all schemata and builds views with lots of UNION to join the result. Obviously there are other processes which use these global

Re: [GENERAL] Update statement results in Out of memory

2016-07-06 Thread Rémi Cura
You could check the max number of points in your geometries : SELECT max(ST_NumPoints(geom)) FROM ... Of course you could still have invalid / abberant geometry, which you could also check (ST_IsValid, St_IsSimple). You could solve both those hypotheses if you could perform your buffer by

Re: [GENERAL] Update statement results in Out of memory

2016-07-06 Thread Paul Ramsey
Running a multi-million row update will take a long time. It's possible you've exposed a memory leak in ST_Buffer (the older your version of GEOS, the more likely that is) but it's also possible you're just running a really long update. I find for batch processing purposes that creating fresh

Re: [GENERAL] Update statement results in Out of memory

2016-07-06 Thread Adrian Klaver
On 07/06/2016 02:13 AM, Ivan Bianchi wrote: Hello, I am trying to update a column using a PostGIS ST_Buffer function into a table of 4.257.769 rows, but after 6 hours, an /Out of memory/ error appears and the kernel starts killing processes until a

Re: [GENERAL] Is it possible to use an EVENT TRIGGER to validate a TRIGGER?

2016-07-06 Thread Luís Eduardo Oliveira Lizardo
Hi Álvaro, thanks for your reaponse. Can you please give me a small example showing how to do this, or more hints? Thanks in advance, Luis Lizardo On Jul 6, 2016 00:02, "Alvaro Herrera" wrote: > Luís Eduardo Oliveira Lizardo wrote: > > Hi, > > > > Is it possible to

Re: [GENERAL] Fastest memmove in C

2016-07-06 Thread FarjadFarid(ChkNet)
Just came across this excellent research work done on memmove by T Herselman. Bearing in mind memory is constantly moved in any database. This excellent set of library would be very handy for those who work at the deep end of postgresql. In a nut shell, the library checks the

Re: [GENERAL] How sync settings or extensions in streaming replication

2016-07-06 Thread Guillaume Lelarge
Le 6 juil. 2016 4:48 AM, "Michael Paquier" a écrit : > > On Wed, Jul 6, 2016 at 11:37 AM, 苏士涛 wrote: > > I am new to PostgreSQL, and i have a question about streaming > > replication. If i enable some extension on master with or without > > native

[GENERAL] Update statement results in Out of memory

2016-07-06 Thread Ivan Bianchi
Hello, I am trying to update a column using a PostGIS ST_Buffer function into a table of 4.257.769 rows, but after 6 hours, an *Out of memory* error appears and the kernel starts killing processes until a *Kernel Panic* shows up. I have simplified the