searchpath reverts to default after each server restart

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JonathanSFL
    New Member
    • Sep 2010
    • 4

    #1

    searchpath reverts to default after each server restart

    When i run the command
    SET search_path TO custom,idsystem s, clientdata, configs, replication, structure, archive;
    then when I run
    SHOW search_path;
    it does show those schemas as the search_path. however when i restart the postgresql service, the search_path has reverted to $User, public.
    when i put the SET search_path function in the postgresql.conf file (as below) the service wouldn't restart. i think because it doesn't like the "public" schema (which i don't use).


    Code:
    #[postgresql.conf file:]
    # the postgresql service wouldn't start with this setting. 
    
    
    # CLIENT CONNECTION DEFAULTS
    #------------------------------------------------------------------------------
    
    # - Statement Behavior -
    
    search_path = custom,idsystems,clientdata,configs,replication,structure,archive,public;
    #schema names
    #default_tablespace = ''		# a tablespace name, '' uses the default
    #temp_tablespaces = ''			# a list of tablespace names, '' uses
    					# only
  • JonathanSFL
    New Member
    • Sep 2010
    • 4

    #2
    i think i fixed it by using the ALTER DATABASE command with it.
    alter database "MYDATABASE " SET search_path TO custom, clientdata, configs, replication, structure, archive;

    Comment

    • rski
      Recognized Expert Contributor
      • Dec 2006
      • 700

      #3
      Do not remove apos, should be
      Code:
      search_path = 'custom,idsystems,clientdata,configs,replication,structure,archive,public'

      Comment

      Working...