Thread: initdb failure on win32
I'm trying to run initdb on win32, freshly compiled from CVS HEAD, but I get the following error: creating template1 database in data/base/1 ... failed to get token information: 122 Any ideas? Regards, Thomas Hallgren
Yes, one :-) Is your account by any chance a member of a large number of groups? If so, how many? There is a fixed buffer of 1024 bytes. I have a feeling ythat one has to be changed to dynamic. //Magnus >-----Original Message----- >From: Thomas Hallgren [mailto:thhal@mailblocks.com] >Sent: den 17 augusti 2004 20:27 >To: pgsql-hackers@postgresql.org >Subject: [HACKERS] initdb failure on win32 > > >I'm trying to run initdb on win32, freshly compiled from CVS >HEAD, but I >get the following error: > >creating template1 database in data/base/1 ... failed to get token >information: 122 > >Any ideas? > >Regards, > >Thomas Hallgren > > >---------------------------(end of >broadcast)--------------------------- >TIP 4: Don't 'kill -9' the postmaster >
Magnus, > There is a fixed buffer of 1024 bytes. I have a feeling ythat one has to > be changed to dynamic. > You're quite right. The 'InfoBufferSize' denotes 1122 bytes after this call. if(!GetTokenInformation(AccessToken,TokenGroups,InfoBuffer,1024,&InfoBufferSize)) Regards, Thomas Hallgren
> > There is a fixed buffer of 1024 bytes. I have a feeling > ythat one has > > to be changed to dynamic. > > > You're quite right. The 'InfoBufferSize' denotes 1122 bytes > after this call. > > if(!GetTokenInformation(AccessToken,TokenGroups,InfoBuffer,102 > 4,&InfoBufferSize)) Ah. Your stop-gap fix is to double the size of the buffer. I'll try to get a patch in for dynamic buffer handling in the next couple of days as the real fix. Just to be sure: Bruce, open item please for "Use dynamic buffer for token buffer in win32 admin check" //Magnus
Magnus Hagander wrote: > > > There is a fixed buffer of 1024 bytes. I have a feeling > > ythat one has > > > to be changed to dynamic. > > > > > You're quite right. The 'InfoBufferSize' denotes 1122 bytes > > after this call. > > > > if(!GetTokenInformation(AccessToken,TokenGroups,InfoBuffer,102 > > 4,&InfoBufferSize)) > > Ah. > Your stop-gap fix is to double the size of the buffer. > > I'll try to get a patch in for dynamic buffer handling in the next > couple of days as the real fix. > > Just to be sure: Bruce, open item please for "Use dynamic buffer for > token buffer in win32 admin check" OK, text updated. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073