mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Revert "Handle better implicit transaction state of pipeline mode"
This reverts commit d77f91214f on all stable branches, due to concerns
regarding the compatility side effects this could create in a minor
release.  The change still exists on HEAD.
Discussion: https://postgr.es/m/CA+TgmoZqRgeFTg4+Yf_CMRRXiHuNz1u6ZC4FvVk+rxw0RmOPnw@mail.gmail.com
Backpatch-through: 13
			
			
This commit is contained in:
		@@ -1070,17 +1070,16 @@ SELCT 1/0;<!-- this typo is intentional -->
 | 
			
		||||
 | 
			
		||||
   <para>
 | 
			
		||||
    If the client has not issued an explicit <command>BEGIN</command>,
 | 
			
		||||
    then an implicit transaction block is started and each Sync ordinarily
 | 
			
		||||
    causes an implicit <command>COMMIT</command> if the preceding step(s)
 | 
			
		||||
    succeeded, or an implicit <command>ROLLBACK</command> if they failed.
 | 
			
		||||
    This implicit transaction block will only be detected by the server
 | 
			
		||||
    when the first command ends without a sync.  There are a few DDL
 | 
			
		||||
    commands (such as <command>CREATE DATABASE</command>) that cannot be
 | 
			
		||||
    executed inside a transaction block. If one of these is executed in a
 | 
			
		||||
    pipeline, it will fail unless it is the first command after a Sync.
 | 
			
		||||
    Furthermore, upon success it will force an immediate commit to preserve
 | 
			
		||||
    database consistency. Thus a Sync immediately following one of these
 | 
			
		||||
    commands has no effect except to respond with ReadyForQuery.
 | 
			
		||||
    then each Sync ordinarily causes an implicit <command>COMMIT</command>
 | 
			
		||||
    if the preceding step(s) succeeded, or an
 | 
			
		||||
    implicit <command>ROLLBACK</command> if they failed.  However, there
 | 
			
		||||
    are a few DDL commands (such as <command>CREATE DATABASE</command>)
 | 
			
		||||
    that cannot be executed inside a transaction block.  If one of
 | 
			
		||||
    these is executed in a pipeline, it will fail unless it is the first
 | 
			
		||||
    command in the pipeline.  Furthermore, upon success it will force an
 | 
			
		||||
    immediate commit to preserve database consistency.  Thus a Sync
 | 
			
		||||
    immediately following one of these commands has no effect except to
 | 
			
		||||
    respond with ReadyForQuery.
 | 
			
		||||
   </para>
 | 
			
		||||
 | 
			
		||||
   <para>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user