Remove a few unused global variables and declarations.
authorHeikki Linnakangas <[email protected]>
Mon, 12 Jun 2023 13:25:37 +0000 (16:25 +0300)
committerHeikki Linnakangas <[email protected]>
Mon, 12 Jun 2023 13:25:37 +0000 (16:25 +0300)
- Commit 3eb77eba5a, which moved the pending ops queue from md.c to
  sync.c, introduced a duplicate, unused 'pendingOpsCxt'
  variable. (I'm surprised none of the compilers or static analysis
  tools have complained about that.)

- Commit c2fe139c20 moved the 'synchronize_seqscans' variable and
  introduced an extern declaration in tableam.h, making the one in
  guc_tables.c unnecessary.

- Commit 6f0cf87872 removed the 'pgstat_temp_directory' GUC, but
  forgot to remove the corresponding global variable.

- Commit 1b4e729eaa removed the 'pg_krb_realm' GUC, and its global
  variable, but forgot the declaration in auth.h.

Spotted all these by reading the code.

src/backend/storage/sync/sync.c
src/backend/utils/misc/guc_tables.c
src/include/libpq/auth.h

index 768d1dbfc41c45f09049bde4f6a123eaaebb11af..04fcb06056d595af6078b07054c384325b35e15d 100644 (file)
@@ -37,8 +37,6 @@
 #include "utils/inval.h"
 #include "utils/memutils.h"
 
-static MemoryContext pendingOpsCxt; /* context for the pending ops state  */
-
 /*
  * In some contexts (currently, standalone backends and the checkpointer)
  * we keep track of pending fsync operations: we need to remember all relation
index 4665b0a35c36c45bb3253e4bce61d50997749591..71e27f8eb051c16e6e9b193eeceed6ed85b9e2c1 100644 (file)
@@ -97,7 +97,6 @@ extern char *default_tablespace;
 extern char *temp_tablespaces;
 extern bool ignore_checksum_failure;
 extern bool ignore_invalid_pages;
-extern bool synchronize_seqscans;
 
 #ifdef TRACE_SYNCSCAN
 extern bool trace_syncscan;
@@ -530,8 +529,6 @@ char       *HbaFileName;
 char      *IdentFileName;
 char      *external_pid_file;
 
-char      *pgstat_temp_directory;
-
 char      *application_name;
 
 int            tcp_keepalives_idle;
index 3b3b2cc4aaa157d58765bdfad6eaf08c8e5a2c13..7fac05b813ffc22672ac6bc3e7054c4a88f16366 100644 (file)
@@ -19,7 +19,6 @@
 extern PGDLLIMPORT char *pg_krb_server_keyfile;
 extern PGDLLIMPORT bool pg_krb_caseins_users;
 extern PGDLLIMPORT bool pg_gss_accept_delegation;
-extern PGDLLIMPORT char *pg_krb_realm;
 
 extern void ClientAuthentication(Port *port);
 extern void sendAuthRequest(Port *port, AuthRequest areq, const char *extradata,