Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit525a489

Browse files
committed
Remove the last vestige of server-side autocommit.
Long ago we briefly had an "autocommit" GUC that turned server-sideautocommit on and off. That behavior was removed in 7.4 after concludingthat it broke far too much client-side logic, and making clients cope withboth behaviors was impractical. But the GUC variable was left behind, soas not to break any client code that might be trying to read its value.Enough time has now passed that we should remove the GUC completely.Whatever vestigial backwards-compatibility benefit it had is outweighed bythe risk of confusion for newbies who assume it ought to do something,as per a recent complaint from Wolfgang Wilhelm.In passing, adjust what seemed to me a rather confusing documentationreference to libpq's autocommit behavior. libpq as such knows nothingabout autocommit, so psql is probably what was meant.
1 parentc30be97 commit525a489

File tree

3 files changed

+2
-27
lines changed

3 files changed

+2
-27
lines changed

‎doc/src/sgml/ecpg.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ EXEC SQL COMMIT;
476476
In the default mode, statements are committed only when
477477
<command>EXEC SQL COMMIT</command> is issued. The embedded SQL
478478
interface also supports autocommit of transactions (similar to
479-
<application>libpq</> behavior) via the <option>-t</option>
479+
<application>psql</>'s default behavior) via the <option>-t</option>
480480
command-line option to <command>ecpg</command> (see <xref
481481
linkend="app-ecpg">) or via the <literal>EXEC SQL SET AUTOCOMMIT TO
482482
ON</literal> statement. In autocommit mode, each command is

‎src/backend/utils/misc/check_guc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
## if an option is valid but shows up in only one file (guc.c but not
1717
## postgresql.conf.sample), it should be listed here so that it
1818
## can be ignored
19-
INTENTIONALLY_NOT_INCLUDED="autocommitdebug_deadlocks\
19+
INTENTIONALLY_NOT_INCLUDED="debug_deadlocks\
2020
is_superuser lc_collate lc_ctype lc_messages lc_monetary lc_numeric lc_time\
2121
pre_auth_delay role seed server_encoding server_version server_version_int\
2222
session_authorization trace_lock_oidmin trace_lock_table trace_locks trace_lwlocks\

‎src/backend/utils/misc/guc.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ static void assign_syslog_facility(int newval, void *extra);
171171
staticvoidassign_syslog_ident(constchar*newval,void*extra);
172172
staticvoidassign_session_replication_role(intnewval,void*extra);
173173
staticboolcheck_temp_buffers(int*newval,void**extra,GucSourcesource);
174-
staticboolcheck_phony_autocommit(bool*newval,void**extra,GucSourcesource);
175174
staticboolcheck_bonjour(bool*newval,void**extra,GucSourcesource);
176175
staticboolcheck_ssl(bool*newval,void**extra,GucSourcesource);
177176
staticboolcheck_stage_log_stats(bool*newval,void**extra,GucSourcesource);
@@ -488,7 +487,6 @@ inthuge_pages;
488487
* and is kept in sync by assign_hooks.
489488
*/
490489
staticchar*syslog_ident_str;
491-
staticboolphony_autocommit;
492490
staticboolsession_auth_is_superuser;
493491
staticdoublephony_random_seed;
494492
staticchar*client_encoding_string;
@@ -1250,17 +1248,6 @@ static struct config_bool ConfigureNamesBool[] =
12501248
false,
12511249
NULL,NULL,NULL
12521250
},
1253-
{
1254-
/* only here for backwards compatibility */
1255-
{"autocommit",PGC_USERSET,CLIENT_CONN_STATEMENT,
1256-
gettext_noop("This parameter doesn't do anything."),
1257-
gettext_noop("It's just here so that we won't choke on SET AUTOCOMMIT TO ON from 7.3-vintage clients."),
1258-
GUC_NO_SHOW_ALL |GUC_NOT_IN_SAMPLE
1259-
},
1260-
&phony_autocommit,
1261-
true,
1262-
check_phony_autocommit,NULL,NULL
1263-
},
12641251
{
12651252
{"default_transaction_read_only",PGC_USERSET,CLIENT_CONN_STATEMENT,
12661253
gettext_noop("Sets the default read-only status of new transactions."),
@@ -9179,18 +9166,6 @@ check_temp_buffers(int *newval, void **extra, GucSource source)
91799166
return true;
91809167
}
91819168

9182-
staticbool
9183-
check_phony_autocommit(bool*newval,void**extra,GucSourcesource)
9184-
{
9185-
if (!*newval)
9186-
{
9187-
GUC_check_errcode(ERRCODE_FEATURE_NOT_SUPPORTED);
9188-
GUC_check_errmsg("SET AUTOCOMMIT TO OFF is no longer supported");
9189-
return false;
9190-
}
9191-
return true;
9192-
}
9193-
91949169
staticbool
91959170
check_bonjour(bool*newval,void**extra,GucSourcesource)
91969171
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp