Re: [HACKERS] space reserved for WAL record does not match what was written: panic on windows

2013-10-10 Thread Andres Freund
On 2013-10-10 08:59:47 -0400, Robert Haas wrote: > On Tue, Oct 8, 2013 at 6:24 PM, Andres Freund wrote: > > Do you have a better alternative? Making the computation unconditionally > > 64bit will have a runtime overhead and adding a StaticAssert in the > > existing macro doesn't work because we us

Re: [HACKERS] space reserved for WAL record does not match what was written: panic on windows

2013-10-10 Thread Robert Haas
On Tue, Oct 8, 2013 at 6:24 PM, Andres Freund wrote: > Do you have a better alternative? Making the computation unconditionally > 64bit will have a runtime overhead and adding a StaticAssert in the > existing macro doesn't work because we use it in array sizes where gcc > balks. > We could try usi

Re: [HACKERS] space reserved for WAL record does not match what was written: panic on windows

2013-10-08 Thread David Rowley
On Wed, Oct 9, 2013 at 5:26 AM, Robert Haas wrote: > On Mon, Oct 7, 2013 at 4:47 PM, Andres Freund > wrote: > > On 2013-10-07 13:25:17 -0400, Robert Haas wrote: > >> On Fri, Oct 4, 2013 at 8:19 AM, Andres Freund > wrote: > >> > Could it be that MAXALIGN/TYPEALIGN doesn't really work for values

Re: [HACKERS] space reserved for WAL record does not match what was written: panic on windows

2013-10-08 Thread Andres Freund
On 2013-10-08 12:26:17 -0400, Robert Haas wrote: > On Mon, Oct 7, 2013 at 4:47 PM, Andres Freund wrote: > > So I guess it's either a separate macro, or we rewrite that piece of > > code to work slightly differently and work directly on the lenght or > > such. > > > > Maybe we should add a StaticAs

Re: [HACKERS] space reserved for WAL record does not match what was written: panic on windows

2013-10-08 Thread Robert Haas
On Mon, Oct 7, 2013 at 4:47 PM, Andres Freund wrote: > On 2013-10-07 13:25:17 -0400, Robert Haas wrote: >> On Fri, Oct 4, 2013 at 8:19 AM, Andres Freund wrote: >> > Could it be that MAXALIGN/TYPEALIGN doesn't really work for values >> > bigger than 32bit? >> > >> > #define MAXALIGN(LEN)

Re: [HACKERS] space reserved for WAL record does not match what was written: panic on windows

2013-10-07 Thread Heikki Linnakangas
On 07.10.2013 23:47, Andres Freund wrote: On 2013-10-07 13:25:17 -0400, Robert Haas wrote: And does that indicate that intptr_t is the wrong type to be using here? No, I don't think so. intptr_t is defined to be a integer type to which you can cast a pointer, cast it back and still get the old

Re: [HACKERS] space reserved for WAL record does not match what was written: panic on windows

2013-10-07 Thread Andres Freund
On 2013-10-07 13:25:17 -0400, Robert Haas wrote: > On Fri, Oct 4, 2013 at 8:19 AM, Andres Freund wrote: > > Could it be that MAXALIGN/TYPEALIGN doesn't really work for values > > bigger than 32bit? > > > > #define MAXALIGN(LEN) TYPEALIGN(MAXIMUM_ALIGNOF, (LEN)) > > #define TYPEAL

Re: [HACKERS] space reserved for WAL record does not match what was written: panic on windows

2013-10-07 Thread Robert Haas
On Fri, Oct 4, 2013 at 8:19 AM, Andres Freund wrote: > Could it be that MAXALIGN/TYPEALIGN doesn't really work for values > bigger than 32bit? > > #define MAXALIGN(LEN) TYPEALIGN(MAXIMUM_ALIGNOF, (LEN)) > #define TYPEALIGN(ALIGNVAL,LEN) \ > (((intptr_t) (LEN) + ((ALIGNVA

Re: [HACKERS] space reserved for WAL record does not match what was written: panic on windows

2013-10-04 Thread David Rowley
On Sat, Oct 5, 2013 at 1:34 AM, David Rowley wrote: > On Sat, Oct 5, 2013 at 1:19 AM, Andres Freund wrote: > >> On 2013-10-05 01:05:37 +1300, David Rowley wrote: >> > In HEAD of 9.4 I'm getting the following: >> > >> > D:\9.4\bin>postgres.exe -D d:\9.4\data >> > LOG: database system was shut dow

Re: [HACKERS] space reserved for WAL record does not match what was written: panic on windows

2013-10-04 Thread David Rowley
On Sat, Oct 5, 2013 at 1:19 AM, Andres Freund wrote: > On 2013-10-05 01:05:37 +1300, David Rowley wrote: > > In HEAD of 9.4 I'm getting the following: > > > > D:\9.4\bin>postgres.exe -D d:\9.4\data > > LOG: database system was shut down at 2013-10-05 00:43:33 NZDT > > LOG: database system is rea

Re: [HACKERS] space reserved for WAL record does not match what was written: panic on windows

2013-10-04 Thread Andres Freund
On 2013-10-05 01:05:37 +1300, David Rowley wrote: > In HEAD of 9.4 I'm getting the following: > > D:\9.4\bin>postgres.exe -D d:\9.4\data > LOG: database system was shut down at 2013-10-05 00:43:33 NZDT > LOG: database system is ready to accept connections > LOG: autovacuum launcher started > PA

[HACKERS] space reserved for WAL record does not match what was written: panic on windows

2013-10-04 Thread David Rowley
In HEAD of 9.4 I'm getting the following: D:\9.4\bin>postgres.exe -D d:\9.4\data LOG: database system was shut down at 2013-10-05 00:43:33 NZDT LOG: database system is ready to accept connections LOG: autovacuum launcher started PANIC: space reserved for WAL record does not match what was writ