mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Run pgindent on generic_xlog.c.
This code desperately needs some micro-optimization, and I'd like it to be formatted a bit more nicely while I work on it.
This commit is contained in:
		@@ -171,14 +171,15 @@ writeDelta(PageData *pageData)
 | 
				
			|||||||
					  BLCKSZ - fragmentBegin,
 | 
										  BLCKSZ - fragmentBegin,
 | 
				
			||||||
					  page + fragmentBegin);
 | 
										  page + fragmentBegin);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WAL_DEBUG
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * If xlog debug is enabled, then check produced delta.  Result of delta
 | 
						 * If xlog debug is enabled, then check produced delta.  Result of delta
 | 
				
			||||||
	 * application to saved image should be the same as current page state.
 | 
						 * application to saved image should be the same as current page state.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
 | 
					#ifdef WAL_DEBUG
 | 
				
			||||||
	if (XLOG_DEBUG)
 | 
						if (XLOG_DEBUG)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		char		tmp[BLCKSZ];
 | 
							char		tmp[BLCKSZ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		memcpy(tmp, image, BLCKSZ);
 | 
							memcpy(tmp, image, BLCKSZ);
 | 
				
			||||||
		applyPageRedo(tmp, pageData->data, pageData->dataLen);
 | 
							applyPageRedo(tmp, pageData->data, pageData->dataLen);
 | 
				
			||||||
		if (memcmp(tmp, page, pageLower)
 | 
							if (memcmp(tmp, page, pageLower)
 | 
				
			||||||
@@ -218,6 +219,7 @@ GenericXLogRegister(GenericXLogState *state, Buffer buffer, bool isNew)
 | 
				
			|||||||
	for (block_id = 0; block_id < MAX_GENERIC_XLOG_PAGES; block_id++)
 | 
						for (block_id = 0; block_id < MAX_GENERIC_XLOG_PAGES; block_id++)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		PageData   *page = &state->pages[block_id];
 | 
							PageData   *page = &state->pages[block_id];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (BufferIsInvalid(page->buffer))
 | 
							if (BufferIsInvalid(page->buffer))
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			page->buffer = buffer;
 | 
								page->buffer = buffer;
 | 
				
			||||||
@@ -372,7 +374,8 @@ GenericXLogAbort(GenericXLogState *state)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
applyPageRedo(Page page, Pointer data, Size dataSize)
 | 
					applyPageRedo(Page page, Pointer data, Size dataSize)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	Pointer ptr = data, end = data + dataSize;
 | 
						Pointer		ptr = data,
 | 
				
			||||||
 | 
									end = data + dataSize;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	while (ptr < end)
 | 
						while (ptr < end)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user