summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2014-11-06 00:35:23 +0000
committerTom Lane2014-11-06 00:35:23 +0000
commit525a489915cad1c5b2fc39e43e8005025afe63b2 (patch)
tree3dc10a8ceeb8da8aba38a82f58a04bbbf62286ae
parentc30be9787bd9808631b72843b0a93f06ce775dd0 (diff)
Remove the last vestige of server-side autocommit.
Long ago we briefly had an "autocommit" GUC that turned server-side autocommit on and off. That behavior was removed in 7.4 after concluding that it broke far too much client-side logic, and making clients cope with both behaviors was impractical. But the GUC variable was left behind, so as 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 by the 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 documentation reference to libpq's autocommit behavior. libpq as such knows nothing about autocommit, so psql is probably what was meant.
-rw-r--r--doc/src/sgml/ecpg.sgml2
-rwxr-xr-xsrc/backend/utils/misc/check_guc2
-rw-r--r--src/backend/utils/misc/guc.c25
3 files changed, 2 insertions, 27 deletions
diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index f9536ee1e4..1b34a6f75f 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -476,7 +476,7 @@ EXEC SQL COMMIT;
In the default mode, statements are committed only when
<command>EXEC SQL COMMIT</command> is issued. The embedded SQL
interface also supports autocommit of transactions (similar to
- <application>libpq</> behavior) via the <option>-t</option>
+ <application>psql</>'s default behavior) via the <option>-t</option>
command-line option to <command>ecpg</command> (see <xref
linkend="app-ecpg">) or via the <literal>EXEC SQL SET AUTOCOMMIT TO
ON</literal> statement. In autocommit mode, each command is
diff --git a/src/backend/utils/misc/check_guc b/src/backend/utils/misc/check_guc
index 293fb0363f..d228bbed68 100755
--- a/src/backend/utils/misc/check_guc
+++ b/src/backend/utils/misc/check_guc
@@ -16,7 +16,7 @@
## if an option is valid but shows up in only one file (guc.c but not
## postgresql.conf.sample), it should be listed here so that it
## can be ignored
-INTENTIONALLY_NOT_INCLUDED="autocommit debug_deadlocks \
+INTENTIONALLY_NOT_INCLUDED="debug_deadlocks \
is_superuser lc_collate lc_ctype lc_messages lc_monetary lc_numeric lc_time \
pre_auth_delay role seed server_encoding server_version server_version_int \
session_authorization trace_lock_oidmin trace_lock_table trace_locks trace_lwlocks \
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index d7142d218d..aca42436d3 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -171,7 +171,6 @@ static void assign_syslog_facility(int newval, void *extra);
static void assign_syslog_ident(const char *newval, void *extra);
static void assign_session_replication_role(int newval, void *extra);
static bool check_temp_buffers(int *newval, void **extra, GucSource source);
-static bool check_phony_autocommit(bool *newval, void **extra, GucSource source);
static bool check_bonjour(bool *newval, void **extra, GucSource source);
static bool check_ssl(bool *newval, void **extra, GucSource source);
static bool check_stage_log_stats(bool *newval, void **extra, GucSource source);
@@ -488,7 +487,6 @@ int huge_pages;
* and is kept in sync by assign_hooks.
*/
static char *syslog_ident_str;
-static bool phony_autocommit;
static bool session_auth_is_superuser;
static double phony_random_seed;
static char *client_encoding_string;
@@ -1251,17 +1249,6 @@ static struct config_bool ConfigureNamesBool[] =
NULL, NULL, NULL
},
{
- /* only here for backwards compatibility */
- {"autocommit", PGC_USERSET, CLIENT_CONN_STATEMENT,
- gettext_noop("This parameter doesn't do anything."),
- gettext_noop("It's just here so that we won't choke on SET AUTOCOMMIT TO ON from 7.3-vintage clients."),
- GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
- },
- &phony_autocommit,
- true,
- check_phony_autocommit, NULL, NULL
- },
- {
{"default_transaction_read_only", PGC_USERSET, CLIENT_CONN_STATEMENT,
gettext_noop("Sets the default read-only status of new transactions."),
NULL
@@ -9180,18 +9167,6 @@ check_temp_buffers(int *newval, void **extra, GucSource source)
}
static bool
-check_phony_autocommit(bool *newval, void **extra, GucSource source)
-{
- if (!*newval)
- {
- GUC_check_errcode(ERRCODE_FEATURE_NOT_SUPPORTED);
- GUC_check_errmsg("SET AUTOCOMMIT TO OFF is no longer supported");
- return false;
- }
- return true;
-}
-
-static bool
check_bonjour(bool *newval, void **extra, GucSource source)
{
#ifndef USE_BONJOUR