Take an ACCESS SHARE LOCK on the target table, in an initial attempt to prevent concurrent DDL.
This is a first pass at Daniele's suggestion in Issue #8, although it is definitely still buggy -- it is still possible for another transaction to get in an AccessExclusive lock and perform DDL either before the ACCESS SHARE lock is acquired or immediately after it is released.
This commit is contained in:
		
				
					committed by
					
						 Daniele Varrazzo
						Daniele Varrazzo
					
				
			
			
				
	
			
			
			
						parent
						
							e02811689a
						
					
				
				
					commit
					78bae38718
				
			| @ -56,6 +56,7 @@ extern char	   *password; | ||||
| extern YesNo	prompt_password; | ||||
|  | ||||
| extern PGconn	   *connection; | ||||
| extern PGconn      *conn2; | ||||
|  | ||||
| extern void	pgut_help(bool details); | ||||
| extern void help(bool details); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user