pg_repack.git / summary / log / commit / refs
commit 370e572cfc85b044e1f3e77d9c8b6793febfa6d1
Author: Josh Kupershmidt <schmiddy@gmail.com>
Commit: Daniele Varrazzo <daniele.varrazzo@gmail.com>
Date: Thu Sep 20 00:04:42 2012 +0000
Get rid of support for PG versions 8.2 and earlier. These have been unsupported for some time, and the #defines do clutter up the codebase.
bin/pg_reorg.c | 22 +++-------------------
bin/pgut/pgut.c | 7 -------
2 files changed, 3 insertions(+), 26 deletions(-)
diff --git a/bin/pg_reorg.c b/bin/pg_reorg.c
index ea7dbe2..275edce 100755
--- a/bin/pg_reorg.c
+++ b/bin/pg_reorg.c
@@ -26,29 +26,13 @@ const char *PROGRAM_EMAIL = "reorg-general@lists.pgfoundry.org";
*/
#define APPLY_COUNT 1000
-#define SQL_XID_SNAPSHOT_80300 \
+#define SQL_XID_SNAPSHOT \
"SELECT reorg.array_accum(virtualtransaction) FROM pg_locks"\
" WHERE locktype = 'virtualxid' AND pid <> pg_backend_pid()"
-#define SQL_XID_SNAPSHOT_80200 \
- "SELECT reorg.array_accum(transactionid) FROM pg_locks"\
- " WHERE locktype = 'transactionid' AND pid <> pg_backend_pid()"
-#define SQL_XID_ALIVE_80300 \
+#define SQL_XID_ALIVE \
"SELECT pid FROM pg_locks WHERE locktype = 'virtualxid'"\
" AND pid <> pg_backend_pid() AND virtualtransaction = ANY($1)"
-#define SQL_XID_ALIVE_80200 \
- "SELECT pid FROM pg_locks WHERE locktype = 'transactionid'"\
- " AND pid <> pg_backend_pid() AND transactionid = ANY($1)"
-
-#define SQL_XID_SNAPSHOT \
- (PQserverVersion(connection) >= 80300 \
- ? SQL_XID_SNAPSHOT_80300 \
- : SQL_XID_SNAPSHOT_80200)
-
-#define SQL_XID_ALIVE \
- (PQserverVersion(connection) >= 80300 \
- ? SQL_XID_ALIVE_80300 \
- : SQL_XID_ALIVE_80200)
/*
* per-table information
@@ -452,7 +436,7 @@ reorg_one_table(const reorg_table *table, const char *orderby)
command("BEGIN ISOLATION LEVEL SERIALIZABLE", 0, NULL);
/* SET work_mem = maintenance_work_mem */
command("SELECT set_config('work_mem', current_setting('maintenance_work_mem'), true)", 0, NULL);
- if (PQserverVersion(connection) >= 80300 && orderby && !orderby[0])
+ if (orderby && !orderby[0])
command("SET LOCAL synchronize_seqscans = off", 0, NULL);
res = execute(SQL_XID_SNAPSHOT, 0, NULL);
vxid = strdup(PQgetvalue(res, 0, 0));
diff --git a/bin/pgut/pgut.c b/bin/pgut/pgut.c
index 64ed480..5ec2bc6 100755
--- a/bin/pgut/pgut.c
+++ b/bin/pgut/pgut.c
@@ -389,13 +389,6 @@ prompt_for_password(void)
return simple_prompt("Password: ", 100, false);
}
-#if PG_VERSION_NUM < 80300
-static bool
-PQconnectionNeedsPassword(PGconn *conn)
-{
- return strcmp(PQerrorMessage(conn), PQnoPasswordSupplied) == 0 && !feof(stdin);
-}
-#endif
PGconn *
pgut_connect(const char *info, YesNo prompt, int elevel)
[parent: 2226f2011d46]