1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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.
This commit is contained in:
Tom Lane
2014-11-05 19:35:23 -05:00
parent c30be9787b
commit 525a489915
3 changed files with 2 additions and 27 deletions

View File

@ -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;
@ -1250,17 +1248,6 @@ static struct config_bool ConfigureNamesBool[] =
false,
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."),
@ -9179,18 +9166,6 @@ check_temp_buffers(int *newval, void **extra, GucSource source)
return true;
}
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)
{