Search Postgresql Archives

Re: Bug in CREATE/DROP TABLESPACE command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



William Garrison <postgres@xxxxxxxxxxxx> writes:
> Tom Lane wrote:
>> What do you mean by "one batch" exactly?  Both CREATE and DROP TABLESPACE
>> refuse to run in a transaction block, so I'm confused about this.

> Not a transaction block.  A batch of commands submitted to the server in 
> a single call.  In MSSQL land, I call that a batch.  I don't know the 
> PostgreSql term. If you are using the pgadmin3 GUI, then I mean pressing 
> F5 once is a single batch.  Pressing it twice is two batches.

Oh, it's a single simple-Query message.  You could reproduce the problem
with psql if you put multiple commands into a "-c" command line switch.

This is a basic oversight in PreventTransactionChain: it doesn't reject
the case where the command is submitted as part of a multi-query string
in a single Query message.

This is relatively easy to fix in CVS HEAD --- we can just teach
exec_simple_query to pass isTopLevel = true only when the querystring
contains a single command, or maybe better only for the last command
of a querystring.  I don't see any very practical way to fix it in
older releases though; at least not anything I'd want to backpatch
when it can't be tested first in HEAD.  Anyone have an idea about a
reasonable back-branch fix?

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux