mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Change Win32 rename/unlink timeout to 3 seconds.
This commit is contained in:
		@@ -21,7 +21,7 @@ pgrename(const char *from, const char *to)
 | 
				
			|||||||
			/* set errno? */
 | 
								/* set errno? */
 | 
				
			||||||
			return -1;
 | 
								return -1;
 | 
				
			||||||
		Sleep(100);				/* ms */
 | 
							Sleep(100);				/* ms */
 | 
				
			||||||
		if (loops == 10)
 | 
							if (loops == 30)
 | 
				
			||||||
#ifndef FRONTEND
 | 
					#ifndef FRONTEND
 | 
				
			||||||
			elog(LOG, "could not rename \"%s\" to \"%s\", continuing to try",
 | 
								elog(LOG, "could not rename \"%s\" to \"%s\", continuing to try",
 | 
				
			||||||
				 from, to);
 | 
									 from, to);
 | 
				
			||||||
@@ -32,7 +32,7 @@ pgrename(const char *from, const char *to)
 | 
				
			|||||||
		loops++;
 | 
							loops++;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (loops > 10)
 | 
						if (loops > 30)
 | 
				
			||||||
#ifndef FRONTEND
 | 
					#ifndef FRONTEND
 | 
				
			||||||
		elog(LOG, "completed rename of \"%s\" to \"%s\"", from, to);
 | 
							elog(LOG, "completed rename of \"%s\" to \"%s\"", from, to);
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
@@ -53,7 +53,7 @@ pgunlink(const char *path)
 | 
				
			|||||||
			/* set errno? */
 | 
								/* set errno? */
 | 
				
			||||||
			return -1;
 | 
								return -1;
 | 
				
			||||||
		Sleep(100);				/* ms */
 | 
							Sleep(100);				/* ms */
 | 
				
			||||||
		if (loops == 10)
 | 
							if (loops == 30)
 | 
				
			||||||
#ifndef FRONTEND
 | 
					#ifndef FRONTEND
 | 
				
			||||||
			elog(LOG, "could not unlink \"%s\", continuing to try",
 | 
								elog(LOG, "could not unlink \"%s\", continuing to try",
 | 
				
			||||||
				 path);
 | 
									 path);
 | 
				
			||||||
@@ -64,7 +64,7 @@ pgunlink(const char *path)
 | 
				
			|||||||
		loops++;
 | 
							loops++;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (loops > 10)
 | 
						if (loops > 30)
 | 
				
			||||||
#ifndef FRONTEND
 | 
					#ifndef FRONTEND
 | 
				
			||||||
		elog(LOG, "completed unlink of \"%s\"", path);
 | 
							elog(LOG, "completed unlink of \"%s\"", path);
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user