[COMMITTERS] pgsql: Fix deadlock with LWLockAcquireWithVar and LWLockWaitForVar.

2014-10-14 Thread Heikki Linnakangas
Fix deadlock with LWLockAcquireWithVar and LWLockWaitForVar. LWLockRelease should release all backends waiting with LWLockWaitForVar, even when another backend has already been woken up to acquire the lock, i.e. when releaseOK is false. LWLockWaitForVar can return as soon as the protected value ch

[COMMITTERS] pgsql: Fix deadlock with LWLockAcquireWithVar and LWLockWaitForVar.

2014-10-14 Thread Heikki Linnakangas
Fix deadlock with LWLockAcquireWithVar and LWLockWaitForVar. LWLockRelease should release all backends waiting with LWLockWaitForVar, even when another backend has already been woken up to acquire the lock, i.e. when releaseOK is false. LWLockWaitForVar can return as soon as the protected value ch

[COMMITTERS] pgsql: Don't let protected variable access to be reordered after spinlo

2014-10-14 Thread Heikki Linnakangas
Don't let protected variable access to be reordered after spinlock release. LWLockAcquireWithVar needs to set the protected variable while holding the spinlock. Need to use a volatile pointer to make sure it doesn't get reordered by the compiler. The other functions that accessed the protected var

[COMMITTERS] pgsql: pg_dump: Reduce use of global variables

2014-10-14 Thread Alvaro Herrera
pg_dump: Reduce use of global variables Most pg_dump.c global variables, which were passed down individually to dumping routines, are now grouped as members of the new DumpOptions struct, which is used as a local variable and passed down into routines that need it. This helps future development e

Re: [COMMITTERS] pgsql: pg_dump: Reduce use of global variables

2014-10-14 Thread Andrew Dunstan
On 10/14/2014 02:20 PM, Alvaro Herrera wrote: pg_dump: Reduce use of global variables Most pg_dump.c global variables, which were passed down individually to dumping routines, are now grouped as members of the new DumpOptions struct, which is used as a local variable and passed down into routin

Re: [COMMITTERS] pgsql: pg_dump: Reduce use of global variables

2014-10-14 Thread Alvaro Herrera
Andrew Dunstan wrote: > > On 10/14/2014 02:20 PM, Alvaro Herrera wrote: > >pg_dump: Reduce use of global variables > This appears to have broken MSVC builds. See > Thanks, I have pushed what should hopefu

[COMMITTERS] pgsql: Blind attempt at fixing Win32 pg_dump issues

2014-10-14 Thread Alvaro Herrera
Blind attempt at fixing Win32 pg_dump issues Per buildfarm failures Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/076d29a1eed5fe51fb2b25b98fcde9dd7c506902 Modified Files -- src/bin/pg_dump/parallel.c|5 - src/bin/pg_dump/pg_backup_utils.