免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6096 | 回复: 7
打印 上一主题 下一主题

postgres8.37实在太脆弱,恢複配置,也无法启动  [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-05-23 18:09 |只看该作者 |倒序浏览
win2003使用,今天只是改动一下postgresql.conf配置,
启动这三行
  1. dynamic_library_path ='$libdir;C:\Program Files\PostgreSQL\8.3\share\pljava'

  2. custom_variable_classes = 'pljava'

  3. pljava.classpath='C:\Program Files\PostgreSQL\8.3\share\pljava\pljava.jar'
复制代码


就无法启动,系统事件,如下
  1. 事件类型:        错误
  2. 事件来源:        PostgreSQL
  3. 事件种类:        无
  4. 事件 ID:        0
  5. 日期:                2009-5-23
  6. 事件:                18:01:30
  7. 用户:                N/A
  8. 计算机:        erpserver
  9. 描述:
  10. [b][color=Red]无法打开进程令牌 (token): 错误码 5[/color][/b]

复制代码


即使把配置恢复,即再加上“#”,重启系统,也是无法启动postgres,一个数据库,竟然如此脆弱,真让人担心,有没人办法解决,谢谢

[ 本帖最后由 eremiter 于 2009-5-24 10:45 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2009-05-24 21:59 |只看该作者
是什么版本?
8.3以前 加#并不会恢复到默认值

论坛徽章:
0
3 [报告]
发表于 2009-05-25 08:40 |只看该作者
原帖由 trainee 于 2009-5-24 21:59 发表
是什么版本?
8.3以前 加#并不会恢复到默认值

俺的是8.371版本,加#都不能恢複默認值,這是什麽數據庫,太可怕了,那要如何處理,謝謝

论坛徽章:
0
4 [报告]
发表于 2009-05-25 08:47 |只看该作者
8.371是可以的恢复成默认值的

如果不放心,请将这3个变量改为以前的值

某些放火墙,杀毒软件,常常会影响启动

论坛徽章:
0
5 [报告]
发表于 2009-05-25 09:15 |只看该作者
原帖由 trainee 于 2009-5-25 08:47 发表
8.371是可以的恢复成默认值的

如果不放心,请将这3个变量改为以前的值

某些放火墙,杀毒软件,常常会影响启动

使用默认自带防火墙,刚才也把nod4杀毒软件禁用,那个配置文件如下
  1. # -----------------------------
  2. # PostgreSQL configuration file
  3. # -----------------------------
  4. #
  5. # This file consists of lines of the form:
  6. #
  7. #   name = value
  8. #
  9. # (The "=" is optional.)  Whitespace may be used.  Comments are introduced with
  10. # "#" anywhere on a line.  The complete list of parameter names and allowed
  11. # values can be found in the PostgreSQL documentation.
  12. #
  13. # The commented-out settings shown in this file represent the default values.
  14. # Re-commenting a setting is NOT sufficient to revert it to the default value;
  15. # you need to reload the server.
  16. #
  17. # This file is read on server startup and when the server receives a SIGHUP
  18. # signal.  If you edit the file on a running system, you have to SIGHUP the
  19. # server for the changes to take effect, or use "pg_ctl reload".  Some
  20. # parameters, which are marked below, require a server shutdown and restart to
  21. # take effect.
  22. #
  23. # Any parameter can also be given as a command-line option to the server, e.g.,
  24. # "postgres -c log_connections=on".  Some paramters can be changed at run time
  25. # with the "SET" SQL command.
  26. #
  27. # Memory units:  kB = kilobytes MB = megabytes GB = gigabytes
  28. # Time units:    ms = milliseconds s = seconds min = minutes h = hours d = days


  29. #------------------------------------------------------------------------------
  30. # FILE LOCATIONS
  31. #------------------------------------------------------------------------------

  32. # The default values of these variables are driven from the -D command-line
  33. # option or PGDATA environment variable, represented here as ConfigDir.

  34. #data_directory = 'ConfigDir'                # use data in another directory
  35.                                         # (change requires restart)
  36. #hba_file = 'ConfigDir/pg_hba.conf'        # host-based authentication file
  37.                                         # (change requires restart)
  38. #ident_file = 'ConfigDir/pg_ident.conf'        # ident configuration file
  39.                                         # (change requires restart)

  40. # If external_pid_file is not explicitly set, no extra PID file is written.
  41. #external_pid_file = '(none)'                # write an extra PID file
  42.                                         # (change requires restart)


  43. #------------------------------------------------------------------------------
  44. # CONNECTIONS AND AUTHENTICATION
  45. #------------------------------------------------------------------------------

  46. # - Connection Settings -

  47. listen_addresses = '*'                # what IP address(es) to listen on;
  48.                                         # comma-separated list of addresses;
  49.                                         # defaults to 'localhost', '*' = all
  50.                                         # (change requires restart)
  51. port = 5432                                # (change requires restart)
  52. max_connections = 100                        # (change requires restart)
  53. # Note:  Increasing max_connections costs ~400 bytes of shared memory per
  54. # connection slot, plus lock space (see max_locks_per_transaction).  You might
  55. # also need to raise shared_buffers to support more connections.
  56. #superuser_reserved_connections = 3        # (change requires restart)
  57. #unix_socket_directory = ''                # (change requires restart)
  58. #unix_socket_group = ''                        # (change requires restart)
  59. #unix_socket_permissions = 0777                # begin with 0 to use octal notation
  60.                                         # (change requires restart)
  61. #bonjour_name = ''                        # defaults to the computer name
  62.                                         # (change requires restart)

  63. # - Security and Authentication -

  64. #authentication_timeout = 1min                # 1s-600s
  65. #ssl = off                                # (change requires restart)
  66. #ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH'        # allowed SSL ciphers
  67.                                         # (change requires restart)
  68. #password_encryption = on
  69. #db_user_namespace = off

  70. # Kerberos and GSSAPI
  71. #krb_server_keyfile = ''                # (change requires restart)
  72. #krb_srvname = 'postgres'                # (change requires restart, Kerberos only)
  73. #krb_server_hostname = ''                # empty string matches any keytab entry
  74.                                         # (change requires restart, Kerberos only)
  75. #krb_caseins_users = off                # (change requires restart)
  76. #krb_realm = ''                           # (change requires restart)

  77. # - TCP Keepalives -
  78. # see "man 7 tcp" for details

  79. #tcp_keepalives_idle = 0                # TCP_KEEPIDLE, in seconds;
  80.                                         # 0 selects the system default
  81. #tcp_keepalives_interval = 0                # TCP_KEEPINTVL, in seconds;
  82.                                         # 0 selects the system default
  83. #tcp_keepalives_count = 0                # TCP_KEEPCNT;
  84.                                         # 0 selects the system default


  85. #------------------------------------------------------------------------------
  86. # RESOURCE USAGE (except WAL)
  87. #------------------------------------------------------------------------------

  88. # - Memory -

  89. shared_buffers = 32MB                        # min 128kB or max_connections*16kB
  90.                                         # (change requires restart)
  91. #temp_buffers = 8MB                        # min 800kB
  92. #max_prepared_transactions = 5                # can be 0 or more
  93.                                         # (change requires restart)
  94. # Note:  Increasing max_prepared_transactions costs ~600 bytes of shared memory
  95. # per transaction slot, plus lock space (see max_locks_per_transaction).
  96. #work_mem = 1MB                                # min 64kB
  97. #maintenance_work_mem = 16MB                # min 1MB
  98. #max_stack_depth = 2MB                        # min 100kB

  99. # - Free Space Map -

  100. max_fsm_pages = 204800                        # min max_fsm_relations*16, 6 bytes each
  101.                                         # (change requires restart)
  102. #max_fsm_relations = 1000                # min 100, ~70 bytes each
  103.                                         # (change requires restart)

  104. # - Kernel Resource Usage -

  105. #max_files_per_process = 1000                # min 25
  106.                                         # (change requires restart)
  107. #shared_preload_libraries = ''                # (change requires restart)

  108. # - Cost-Based Vacuum Delay -

  109. #vacuum_cost_delay = 0                        # 0-1000 milliseconds
  110. #vacuum_cost_page_hit = 1                # 0-10000 credits
  111. #vacuum_cost_page_miss = 10                # 0-10000 credits
  112. #vacuum_cost_page_dirty = 20                # 0-10000 credits
  113. #vacuum_cost_limit = 200                # 1-10000 credits

  114. # - Background Writer -

  115. #bgwriter_delay = 200ms                        # 10-10000ms between rounds
  116. #bgwriter_lru_maxpages = 100                # 0-1000 max buffers written/round
  117. #bgwriter_lru_multiplier = 2.0                # 0-10.0 multipler on buffers scanned/round


  118. #------------------------------------------------------------------------------
  119. # WRITE AHEAD LOG
  120. #------------------------------------------------------------------------------

  121. # - Settings -

  122. #fsync = on                                # turns forced synchronization on or off
  123. #synchronous_commit = on                # immediate fsync at commit
  124. #wal_sync_method = fsync                # the default is the first option
  125.                                         # supported by the operating system:
  126.                                         #   open_datasync
  127.                                         #   fdatasync
  128.                                         #   fsync
  129.                                         #   fsync_writethrough
  130.                                         #   open_sync
  131. #full_page_writes = on                        # recover from partial page writes
  132. #wal_buffers = 64kB                        # min 32kB
  133.                                         # (change requires restart)
  134. #wal_writer_delay = 200ms                # 1-10000 milliseconds

  135. #commit_delay = 0                        # range 0-100000, in microseconds
  136. #commit_siblings = 5                        # range 1-1000

  137. # - Checkpoints -

  138. #checkpoint_segments = 3                # in logfile segments, min 1, 16MB each
  139. #checkpoint_timeout = 5min                # range 30s-1h
  140. #checkpoint_completion_target = 0.5        # checkpoint target duration, 0.0 - 1.0
  141. #checkpoint_warning = 30s                # 0 is off

  142. # - Archiving -

  143. #archive_mode = off                # allows archiving to be done
  144.                                 # (change requires restart)
  145. #archive_command = ''                # command to use to archive a logfile segment
  146. #archive_timeout = 0                # force a logfile segment switch after this
  147.                                 # time; 0 is off


  148. #------------------------------------------------------------------------------
  149. # QUERY TUNING
  150. #------------------------------------------------------------------------------

  151. # - Planner Method Configuration -

  152. #enable_bitmapscan = on
  153. #enable_hashagg = on
  154. #enable_hashjoin = on
  155. #enable_indexscan = on
  156. #enable_mergejoin = on
  157. #enable_nestloop = on
  158. #enable_seqscan = on
  159. #enable_sort = on
  160. #enable_tidscan = on

  161. # - Planner Cost Constants -

  162. #seq_page_cost = 1.0                        # measured on an arbitrary scale
  163. #random_page_cost = 4.0                        # same scale as above
  164. #cpu_tuple_cost = 0.01                        # same scale as above
  165. #cpu_index_tuple_cost = 0.005                # same scale as above
  166. #cpu_operator_cost = 0.0025                # same scale as above
  167. #effective_cache_size = 128MB

  168. # - Genetic Query Optimizer -

  169. #geqo = on
  170. #geqo_threshold = 12
  171. #geqo_effort = 5                        # range 1-10
  172. #geqo_pool_size = 0                        # selects default based on effort
  173. #geqo_generations = 0                        # selects default based on effort
  174. #geqo_selection_bias = 2.0                # range 1.5-2.0

  175. # - Other Planner Options -

  176. #default_statistics_target = 10                # range 1-1000
  177. #constraint_exclusion = off
  178. #from_collapse_limit = 8
  179. #join_collapse_limit = 8                # 1 disables collapsing of explicit
  180.                                         # JOIN clauses


  181. #------------------------------------------------------------------------------
  182. # ERROR REPORTING AND LOGGING
  183. #------------------------------------------------------------------------------

  184. # - Where to Log -

  185. log_destination = 'stderr'                # Valid values are combinations of
  186.                                         # stderr, csvlog, syslog and eventlog,
  187.                                         # depending on platform.  csvlog
  188.                                         # requires logging_collector to be on.

  189. # This is used when logging to stderr:
  190. logging_collector = on                # Enable capturing of stderr and csvlog
  191.                                         # into log files. Required to be on for
  192.                                         # csvlogs.
  193.                                         # (change requires restart)

  194. # These are only used if logging_collector is on:
  195. #log_directory = 'pg_log'                # directory where log files are written,
  196.                                         # can be absolute or relative to PGDATA
  197. #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'        # log file name pattern,
  198.                                         # can include strftime() escapes
  199. #log_truncate_on_rotation = off                # If on, an existing log file of the
  200.                                         # same name as the new log file will be
  201.                                         # truncated rather than appended to.
  202.                                         # But such truncation only occurs on
  203.                                         # time-driven rotation, not on restarts
  204.                                         # or size-driven rotation.  Default is
  205.                                         # off, meaning append to existing files
  206.                                         # in all cases.
  207. #log_rotation_age = 1d                        # Automatic rotation of logfiles will
  208.                                         # happen after that time.  0 to disable.
  209. #log_rotation_size = 10MB                # Automatic rotation of logfiles will
  210.                                         # happen after that much log output.
  211.                                         # 0 to disable.

  212. # These are relevant when logging to syslog:
  213. #syslog_facility = 'LOCAL0'
  214. #syslog_ident = 'postgres'


  215. # - When to Log -

  216. #client_min_messages = notice                # values in order of decreasing detail:
  217.                                         #   debug5
  218.                                         #   debug4
  219.                                         #   debug3
  220.                                         #   debug2
  221.                                         #   debug1
  222.                                         #   log
  223.                                         #   notice
  224.                                         #   warning
  225.                                         #   error

  226. #log_min_messages = notice                # values in order of decreasing detail:
  227.                                         #   debug5
  228.                                         #   debug4
  229.                                         #   debug3
  230.                                         #   debug2
  231.                                         #   debug1
  232.                                         #   info
  233.                                         #   notice
  234.                                         #   warning
  235.                                         #   error
  236.                                         #   log
  237.                                         #   fatal
  238.                                         #   panic

  239. #log_error_verbosity = default                # terse, default, or verbose messages

  240. #log_min_error_statement = error        # values in order of decreasing detail:
  241.                                          #   debug5
  242.                                         #   debug4
  243.                                         #   debug3
  244.                                         #   debug2
  245.                                         #   debug1
  246.                                          #   info
  247.                                         #   notice
  248.                                         #   warning
  249.                                         #   error
  250.                                         #   log
  251.                                         #   fatal
  252.                                         #   panic (effectively off)

  253. #log_min_duration_statement = -1        # -1 is disabled, 0 logs all statements
  254.                                         # and their durations, > 0 logs only
  255.                                         # statements running at least this time.

  256. #silent_mode = off                        # DO NOT USE without syslog or
  257.                                         # logging_collector
  258.                                         # (change requires restart)

  259. # - What to Log -

  260. #debug_print_parse = off
  261. #debug_print_rewritten = off
  262. #debug_print_plan = off
  263. #debug_pretty_print = off
  264. #log_checkpoints = off
  265. #log_connections = off
  266. #log_disconnections = off
  267. #log_duration = off
  268. #log_hostname = off
  269. log_line_prefix = '%%t '                        # special values:
  270.                                         #   %u = user name
  271.                                         #   %d = database name
  272.                                         #   %r = remote host and port
  273.                                         #   %h = remote host
  274.                                         #   %p = process ID
  275.                                         #   %t = timestamp without milliseconds
  276.                                         #   %m = timestamp with milliseconds
  277.                                         #   %i = command tag
  278.                                         #   %c = session ID
  279.                                         #   %l = session line number
  280.                                         #   %s = session start timestamp
  281.                                         #   %v = virtual transaction ID
  282.                                         #   %x = transaction ID (0 if none)
  283.                                         #   %q = stop here in non-session
  284.                                         #        processes
  285.                                         #   %% = '%'
  286.                                         # e.g. '<%u%%%d> '
  287. #log_lock_waits = off                        # log lock waits >= deadlock_timeout
  288. #log_statement = 'none'                        # none, ddl, mod, all
  289. #log_temp_files = -1                        # log temporary files equal or larger
  290.                                         # than specified size;
  291.                                         # -1 disables, 0 logs all temp files
  292. #log_timezone = unknown                        # actually, defaults to TZ environment
  293.                                         # setting


  294. #------------------------------------------------------------------------------
  295. # RUNTIME STATISTICS
  296. #------------------------------------------------------------------------------

  297. # - Query/Index Statistics Collector -

  298. #track_activities = on
  299. #track_counts = on
  300. #update_process_title = on


  301. # - Statistics Monitoring -

  302. #log_parser_stats = off
  303. #log_planner_stats = off
  304. #log_executor_stats = off
  305. #log_statement_stats = off


  306. #------------------------------------------------------------------------------
  307. # AUTOVACUUM PARAMETERS
  308. #------------------------------------------------------------------------------

  309. #autovacuum = on                        # Enable autovacuum subprocess?  'on'
  310.                                         # requires track_counts to also be on.
  311. #log_autovacuum_min_duration = -1        # -1 disables, 0 logs all actions and
  312.                                         # their durations, > 0 logs only
  313.                                         # actions running at least that time.
  314. #autovacuum_max_workers = 3                # max number of autovacuum subprocesses
  315. #autovacuum_naptime = 1min                # time between autovacuum runs
  316. #autovacuum_vacuum_threshold = 50        # min number of row updates before
  317.                                         # vacuum
  318. #autovacuum_analyze_threshold = 50        # min number of row updates before
  319.                                         # analyze
  320. #autovacuum_vacuum_scale_factor = 0.2        # fraction of table size before vacuum
  321. #autovacuum_analyze_scale_factor = 0.1        # fraction of table size before analyze
  322. #autovacuum_freeze_max_age = 200000000        # maximum XID age before forced vacuum
  323.                                         # (change requires restart)
  324. #autovacuum_vacuum_cost_delay = 20        # default vacuum cost delay for
  325.                                         # autovacuum, -1 means use
  326.                                         # vacuum_cost_delay
  327. #autovacuum_vacuum_cost_limit = -1        # default vacuum cost limit for
  328.                                         # autovacuum, -1 means use
  329.                                         # vacuum_cost_limit


  330. #------------------------------------------------------------------------------
  331. # CLIENT CONNECTION DEFAULTS
  332. #------------------------------------------------------------------------------

  333. # - Statement Behavior -

  334. #search_path = '"$user",public'                # schema names
  335. #default_tablespace = ''                # a tablespace name, '' uses the default
  336. #temp_tablespaces = ''                        # a list of tablespace names, '' uses
  337.                                         # only default tablespace
  338. #check_function_bodies = on
  339. #default_transaction_isolation = 'read committed'
  340. #default_transaction_read_only = off
  341. #session_replication_role = 'origin'
  342. #statement_timeout = 0                        # 0 is disabled
  343. #vacuum_freeze_min_age = 100000000
  344. #xmlbinary = 'base64'
  345. #xmloption = 'content'

  346. # - Locale and Formatting -

  347. datestyle = 'iso, ymd'
  348. #timezone = unknown                        # actually, defaults to TZ environment
  349.                                         # setting
  350. #timezone_abbreviations = 'Default'     # Select the set of available time zone
  351.                                         # abbreviations.  Currently, there are
  352.                                         #   Default
  353.                                         #   Australia
  354.                                         #   India
  355.                                         # You can create your own file in
  356.                                         # share/timezonesets/.
  357. #extra_float_digits = 0                        # min -15, max 2
  358. #client_encoding = sql_ascii                # actually, defaults to database
  359.                                         # encoding

  360. # These settings are initialized by initdb, but they can be changed.
  361. lc_messages = 'Chinese_People''s Republic of China.936'                        # locale for system error message
  362.                                         # strings
  363. lc_monetary = 'Chinese_People''s Republic of China.936'                        # locale for monetary formatting
  364. lc_numeric = 'Chinese_People''s Republic of China.936'                        # locale for number formatting
  365. lc_time = 'Chinese_People''s Republic of China.936'                                # locale for time formatting

  366. # default configuration for text search
  367. default_text_search_config = 'pg_catalog.simple'

  368. # - Other Defaults -

  369. #explain_pretty_print = on
  370. #dynamic_library_path = '$libdir'
  371. #local_preload_libraries = ''


  372. #------------------------------------------------------------------------------
  373. # LOCK MANAGEMENT
  374. #------------------------------------------------------------------------------

  375. #deadlock_timeout = 1s
  376. #max_locks_per_transaction = 64                # min 10
  377.                                         # (change requires restart)
  378. # Note:  Each lock table slot uses ~270 bytes of shared memory, and there are
  379. # max_locks_per_transaction * (max_connections + max_prepared_transactions)
  380. # lock table slots.


  381. #------------------------------------------------------------------------------
  382. # VERSION/PLATFORM COMPATIBILITY
  383. #------------------------------------------------------------------------------

  384. # - Previous PostgreSQL Versions -

  385. #add_missing_from = off
  386. #array_nulls = on
  387. #backslash_quote = safe_encoding        # on, off, or safe_encoding
  388. #default_with_oids = off
  389. #escape_string_warning = on
  390. #regex_flavor = advanced                # advanced, extended, or basic
  391. #sql_inheritance = on
  392. #standard_conforming_strings = off
  393. #synchronize_seqscans = on

  394. # - Other Platforms and Clients -

  395. #transform_null_equals = off


  396. #------------------------------------------------------------------------------
  397. # CUSTOMIZED OPTIONS
  398. #------------------------------------------------------------------------------

  399. #custom_variable_classes = 'pljava'                # list of custom variable class names
  400. #pljava.classpath='D:\Program Files\PostgreSQL\8.3\share\pljava\pljava.jar'
复制代码

论坛徽章:
0
6 [报告]
发表于 2009-05-25 11:26 |只看该作者
我想应该和postgresql.conf没关系

出现这错误, 是windows的进程权限错误

你是否改动了启动postgresql服务的用户或其权限

论坛徽章:
0
7 [报告]
发表于 2009-05-25 12:36 |只看该作者
原帖由 trainee 于 2009-5-25 11:26 发表
我想应该和postgresql.conf没关系

出现这错误, 是windows的进程权限错误

你是否改动了启动postgresql服务的用户或其权限


沒有改,只改計算機的名子,但啓動很正常,後來改一下配置,就死翹翹了

论坛徽章:
0
8 [报告]
发表于 2009-06-08 16:40 |只看该作者
一个理性的软件在有发现有潜在问题的时候就应该用这种休克疗法。否则待问题爆发导致数据丢失就郁闷大了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP