Re: Tracking down log segment corruption
От | Tom Lane |
---|---|
Тема | Re: Tracking down log segment corruption |
Дата | |
Msg-id | 19434.1272839395@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Tracking down log segment corruption (Gordon Shannon <gordo169@gmail.com>) |
Список | pgsql-general |
Gordon Shannon <gordo169@gmail.com> writes: > In any case, I will cease and desist from ALTER SET TABLESPACE for a while!. Here's the applied patch, if you are interested in testing it. regards, tom lane Index: src/backend/access/heap/heapam.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v retrieving revision 1.277.2.1 diff -c -r1.277.2.1 heapam.c *** src/backend/access/heap/heapam.c 24 Aug 2009 02:18:40 -0000 1.277.2.1 --- src/backend/access/heap/heapam.c 2 May 2010 22:19:04 -0000 *************** *** 4195,4202 **** * Note: the NEWPAGE log record is used for both heaps and indexes, so do * not do anything that assumes we are touching a heap. */ ! buffer = XLogReadBuffer(xlrec->node, xlrec->blkno, true); Assert(BufferIsValid(buffer)); page = (Page) BufferGetPage(buffer); Assert(record->xl_len == SizeOfHeapNewpage + BLCKSZ); --- 4195,4204 ---- * Note: the NEWPAGE log record is used for both heaps and indexes, so do * not do anything that assumes we are touching a heap. */ ! buffer = XLogReadBufferExtended(xlrec->node, xlrec->forknum, xlrec->blkno, ! RBM_ZERO); Assert(BufferIsValid(buffer)); + LockBuffer(buffer, BUFFER_LOCK_EXCLUSIVE); page = (Page) BufferGetPage(buffer); Assert(record->xl_len == SizeOfHeapNewpage + BLCKSZ);
В списке pgsql-general по дате отправления: