On Sat, Nov 8, 2014 at 8:56 AM, Alvaro Herrera <alvhe...@2ndquadrant.com> wrote:
> > I just pushed this, after some more minor tweaks. Thanks, and please do > continue testing! > > I'm having problems getting this to compile on MSVC. Attached is a patch which fixes the problem. There also seems to be a bit of a problem with: brin.c(250): warning C4700: uninitialized local variable 'newsz' used /* * Before releasing the lock, check if we can attempt a same-page * update. Another process could insert a tuple concurrently in * the same page though, so downstream we must be prepared to cope * if this turns out to not be possible after all. */ samepage = brin_can_do_samepage_update(buf, origsz, newsz); LockBuffer(buf, BUFFER_LOCK_UNLOCK); newtup = brin_form_tuple(bdesc, heapBlk, dtup, &newsz); Here newsz is passed to brin_can_do_samepage_update before being initialised. I'm not quite sure of the solution here as I've not spent much time looking at it, but perhaps brin_form_tuple needs to happen before brin_can_do_samepage_update, then the lock should be released? I didn't change this in the patch as I'm not sure if that's the proper fix or not. The attached should fix the build problem that anole is having: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=anole&dt=2014-11-07%2022%3A04%3A03 Regards David Rowley
diff --git a/src/include/access/brin_internal.h b/src/include/access/brin_internal.h index 651ab5f..220e9a9 100644 --- a/src/include/access/brin_internal.h +++ b/src/include/access/brin_internal.h @@ -78,7 +78,7 @@ typedef struct BrinDesc #if defined(BRIN_DEBUG) && defined(__GNUC__) #define BRIN_elog(level, ...) elog(level, __VA_ARGS__) #else -#define BRIN_elog(a) void(0) +#define BRIN_elog(a, ...) ((void)0) #endif /* brin.c */
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers