[This topic is migrated from our old forums. The original author name has been removed]
My connection is set to autocommit=off (Postgres).
When I, e.g., add a column to a table the columns tab does not show the new column.
Then I open a SQL commander, and there I enter "commit". After that the new column is visible.
I analyzed this with "Packetyzer". DbVis creates a new connection to execute the ALTER TABLE statement.
This connection does not use autocommit, likely due to my setting. Then, when I open a SQL commander,
it uses that same connection (a 2nd SQL commander uses a new connection).
I think a solution would be to always use autocommit for that internal connection or to provide
a dialog to give the commit manually. Besides, a new connection should be used for a new SQL commander.
Then such a connection can be closed when the SQL commander is closed, and things would be
more transparent to the user.
Edited by: Matthias Bergk on 21.01.2013 10:19
Re: Changes in ALTER TABLE dialog are not committed.
Hi Matthias,
Which DbVisualizer version are you using?
Best Regards,
Hans
a
anonymous
said
almost 12 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Changes in ALTER TABLE dialog are not committed.
Product: DbVisualizer Pro 9.0.2
Build: #1912 (2012/12/18 10:21)
Java VM: Java HotSpot(TM) Client VM
Java Version: 1.7.0_11
Java Vendor: Oracle Corporation
OS Name: Windows XP
OS Arch: x86
OS Version: 5.1
Hans Bergsten
said
almost 12 years ago
[This reply is migrated from our old forums.]
Re: Changes in ALTER TABLE dialog are not committed.
Hi Matthias,
Thanks for reporting this.
You're right that this is caused by auto-commit being disabled for the connection used to run the ALTER command. We will find a way to fix that.
Regarding the first SQL Commander getting the same connection, it should not be a problem. Actions get a connection from a pool, executes the statement, and returns the connection to the pool. An SQL Commander also get its connection from the pool, but then it holds on to it and close it when the SQL Commander is closed. In your example, the first SQL Commander happened to get the connection previously used by the Action.
As long as the pooled connections are either committed or rolled back before they are returned to the pool, it should be fine. As you pointed out, this did not happen when auto-commit was disabled but we will fix that.
Best Regards,
Hans
Roger Bjärevall
said
almost 12 years ago
[This reply is migrated from our old forums.]
Re: Changes in ALTER TABLE dialog are not committed.
Matthias,
This is now fixed in the latest 9.0.3 version.
http://www.dbvis.com/download/
Regards
Roger
anonymous