pgsql: Fix timeout handling in logical replication worker

2019-10-17 Thread Michael Paquier
Fix timeout handling in logical replication worker The timestamp tracking the last moment a message is received in a logical replication worker was initialized in each loop checking if a message was received or not, causing wal_receiver_timeout to be ignored in basically any logical replication de

pgsql: Fix timeout handling in logical replication worker

2019-10-17 Thread Michael Paquier
Fix timeout handling in logical replication worker The timestamp tracking the last moment a message is received in a logical replication worker was initialized in each loop checking if a message was received or not, causing wal_receiver_timeout to be ignored in basically any logical replication de

pgsql: Fix timeout handling in logical replication worker

2019-10-17 Thread Michael Paquier
Fix timeout handling in logical replication worker The timestamp tracking the last moment a message is received in a logical replication worker was initialized in each loop checking if a message was received or not, causing wal_receiver_timeout to be ignored in basically any logical replication de

pgsql: Fix timeout handling in logical replication worker

2019-10-17 Thread Michael Paquier
Fix timeout handling in logical replication worker The timestamp tracking the last moment a message is received in a logical replication worker was initialized in each loop checking if a message was received or not, causing wal_receiver_timeout to be ignored in basically any logical replication de

Re: pgsql: Fix bug that could try to freeze running multixacts.

2019-10-17 Thread Thomas Munro
On Thu, Oct 17, 2019 at 7:36 PM Alvaro Herrera wrote: > On 2019-Oct-16, Thomas Munro wrote: > > Fix bug that could try to freeze running multixacts. > > > > Commits 801c2dc7 and 801c2dc7 made it possible for vacuum to > > try to freeze a multixact that is still running. > > Hmm, is that one commit

pgsql: Fix minor bug in logical-replication walsender shutdown

2019-10-17 Thread Alvaro Herrera
Fix minor bug in logical-replication walsender shutdown Logical walsender should exit when it catches up with sending WAL during shutdown; but there was a rare corner case when it failed to because of a race condition that puts it back to wait for more WAL instead -- but since there wasn't any, it

pgsql: Fix minor bug in logical-replication walsender shutdown

2019-10-17 Thread Alvaro Herrera
Fix minor bug in logical-replication walsender shutdown Logical walsender should exit when it catches up with sending WAL during shutdown; but there was a rare corner case when it failed to because of a race condition that puts it back to wait for more WAL instead -- but since there wasn't any, it

pgsql: Fix minor bug in logical-replication walsender shutdown

2019-10-17 Thread Alvaro Herrera
Fix minor bug in logical-replication walsender shutdown Logical walsender should exit when it catches up with sending WAL during shutdown; but there was a rare corner case when it failed to because of a race condition that puts it back to wait for more WAL instead -- but since there wasn't any, it

pgsql: Fix minor bug in logical-replication walsender shutdown

2019-10-17 Thread Alvaro Herrera
Fix minor bug in logical-replication walsender shutdown Logical walsender should exit when it catches up with sending WAL during shutdown; but there was a rare corner case when it failed to because of a race condition that puts it back to wait for more WAL instead -- but since there wasn't any, it

pgsql: Fix minor bug in logical-replication walsender shutdown

2019-10-17 Thread Alvaro Herrera
Fix minor bug in logical-replication walsender shutdown Logical walsender should exit when it catches up with sending WAL during shutdown; but there was a rare corner case when it failed to because of a race condition that puts it back to wait for more WAL instead -- but since there wasn't any, it

pgsql: Fix minor bug in logical-replication walsender shutdown

2019-10-17 Thread Alvaro Herrera
Fix minor bug in logical-replication walsender shutdown Logical walsender should exit when it catches up with sending WAL during shutdown; but there was a rare corner case when it failed to because of a race condition that puts it back to wait for more WAL instead -- but since there wasn't any, it

pgsql: Fix minor bug in logical-replication walsender shutdown

2019-10-17 Thread Alvaro Herrera
Fix minor bug in logical-replication walsender shutdown Logical walsender should exit when it catches up with sending WAL during shutdown; but there was a rare corner case when it failed to because of a race condition that puts it back to wait for more WAL instead -- but since there wasn't any, it

pgsql: Fix parallel restore of FKs to partitioned tables

2019-10-17 Thread Alvaro Herrera
Fix parallel restore of FKs to partitioned tables When an FK constraint is created, it needs the index on the referenced table to exist and be valid. When doing parallel pg_restore and the referenced table was partitioned, this condition can sometimes not be met, because pg_dump didn't emit suffi

pgsql: Fix parallel restore of FKs to partitioned tables

2019-10-17 Thread Alvaro Herrera
Fix parallel restore of FKs to partitioned tables When an FK constraint is created, it needs the index on the referenced table to exist and be valid. When doing parallel pg_restore and the referenced table was partitioned, this condition can sometimes not be met, because pg_dump didn't emit suffi