Re: Refresh Publication takes hours and doesn´t finish

2019-05-23 Thread Peter Eisentraut
On 2019-05-20 23:30, Tom Lane wrote: > Hmm ... given that pg_get_publication_tables() shouldn't return any > duplicate OIDs, it does seem unnecessarily inefficient to put it in > an IN-subselect condition. Peter, is there a reason why this isn't > a straight lateral join? I get a much

Re: Re: Re: Refresh Publication takes hours and doesn´t finish

2019-05-21 Thread Tom Lane
=?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= writes: > Em ter, 21 de mai de 2019 às 14:41, Tom Lane escreveu: >> It's a view, not a table, so I don't think you need >> allow_system_table_mods. A quick test here says that being >> superuser is enough to do a CREATE OR REPLACE VIEW on it. >

Re: Re: Refresh Publication takes hours and doesn´t finish

2019-05-21 Thread Fabrízio de Royes Mello
Em ter, 21 de mai de 2019 às 14:41, Tom Lane escreveu: > > =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= writes: > > As I said before to change system catalog you should set > > "allow_system_table_mods=on" and restart PostgreSQL service. > > After that you'll able to recreate the

Re: Re: Refresh Publication takes hours and doesn´t finish

2019-05-21 Thread Tom Lane
=?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= writes: > As I said before to change system catalog you should set > "allow_system_table_mods=on" and restart PostgreSQL service. > After that you'll able to recreate the "pg_catalog.pg_publication_tables" > system view. (You can use the Tom's suggestion

Re: Refresh Publication takes hours and doesn´t finish

2019-05-21 Thread Fabrízio de Royes Mello
Em ter, 21 de mai de 2019 às 14:17, PegoraroF10 escreveu: > > Restart Postgres means exactly what ? We tried just restart the service but > we tried to refresh publication the old view was used because it took 2hours > and gave us a timeout. > As I said before to change system catalog you should

Re: Refresh Publication takes hours and doesn´t finish

2019-05-21 Thread PegoraroF10
Restart Postgres means exactly what ? We tried just restart the service but we tried to refresh publication the old view was used because it took 2hours and gave us a timeout. I found some people talking that I need to initdb, but initdb means recreate entirely my database or just reinstall my

Re: Re: Refresh Publication takes hours and doesn´t finish

2019-05-21 Thread PegoraroF10
I cannot because we created a replication for ALL TABLES -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Re: Re: Refresh Publication takes hours and doesn´t finish

2019-05-20 Thread Fabrízio de Royes Mello
Em seg, 20 de mai de 2019 às 18:30, Tom Lane escreveu: > > Hmm ... given that pg_get_publication_tables() shouldn't return any > duplicate OIDs, it does seem unnecessarily inefficient to put it in > an IN-subselect condition. Peter, is there a reason why this isn't > a straight lateral join? I

Re: Re: Refresh Publication takes hours and doesn´t finish

2019-05-20 Thread Tom Lane
PegoraroF10 writes: > I tried sometime ago ... but with no responses, I ask you again. > pg_publication_tables is a view that is used to refresh publication, but as > we have 15.000 tables, it takes hours and doesn´t complete. If I change that > view I can have an immediate result. The question

Re: Refresh Publication takes hours and doesn´t finish

2019-05-20 Thread PegoraroF10
I tried sometime ago ... but with no responses, I ask you again. pg_publication_tables is a view that is used to refresh publication, but as we have 15.000 tables, it takes hours and doesn´t complete. If I change that view I can have an immediate result. The question is: Can I change that view ?

Refresh Publication takes hours and doesn´t finish

2019-02-28 Thread PegoraroF10
*We use logical replication from a PG version 10.6 to a 11.2. Both are Ubuntu 16.04.We have a hundred schemas with more or less a hundred tables, so number of tables is about 10.000. All replication is ok but when we try to do a REFRESH SUBSCRIPTION because we added a new schema, it takes hours