vacuum full et hot standby WAL stream: FATAL

pierre crumeyrolle <[email protected]>
Newsgroups gmane.comp.db.postgresql.french
Message-ID <[email protected]>
bonjour,
j'ai un plantage suite à l’exécution d'un vacuum full sur une base 
primaire , vacuum full afin de palier à une fragmentation suite à une 
série d'insert/update sur un table d'historique instrumenté par un 
autovacuum
L’erreur sur l’esclave qui le fait planté :=> 2016-05-24 03:10:07.420 
UTC   0 FATAL:  could not receive data from WAL stream: FATAL:  
requested WAL segment 00000063000003B700000091 has already been removed
Sur le maitre, on a l’équivalent :=> 2016-05-24 00:00:00.908 UTC 
replication [unknown] 0 47/0FATAL:  requested WAL segment 
00000063000003B700000091 has already been removed

  postgresql 9.1, pas de problème d'espace disque constaté

quelqu’un a t'il une piste ? bug , saturation des walls par le vacuum full ?

merci

  l’autovacuum pour la table de supervision…

cmoip=# \d supervision_object_property_history

      Table « public.supervision_object_property_history »

       Colonne       |           Type | Modificateurs

--------------------+--------------------------+---------------

id                 | integer | non NULL

end_date           | timestamp with time zone | non NULL

is_new_valid       | boolean | non NULL

new_value          | character varying(1000) |

is_old_valid       | boolean |

old_value          | character varying(1000) |

start_date         | timestamp with time zone | non NULL

object_property_id | integer | non NULL

Index :

     "supervision_object_property_history_pkey" PRIMARY KEY, btree (id)

"supervision_object_property_his_end_date_object_property_id_key" UNIQUE 
CONSTRAINT, btree (object_property_id, end_date) DEFERRABLE INITIALLY 
DEFERRED

     "idx_fk_supervision_object_property" btree (object_property_id)

     "idx_sup_obj_prop_history2" btree (start_date DESC, object_property_id)

     "idx_sup_obj_prop_history3" btree (object_property_id, start_date DESC)

Contraintes de clés étrangères :

     "fkfbd713ce9b43da3c" FOREIGN KEY (object_property_id) REFERENCES 
supervision_object_property(id)

{fillfactor=50,autovacuum_enabled=true,autovacuum_vacuum_threshold=1000,autovacuum_vacuum_scale_factor=0,autovacuum_analyze_threshold=1000,autovacuum_analyze_scale_factor=0}


ci dessous le postgressql.conf

# #########################################################################
# NOM        : postgresql.conf
# AUTEUR    : J.C.DIDIOT
# DATE        : 14/02/2014
# CIBLE        : Serveurs master / slave
#          Doit etre positionne sur tous les serveurs pour etre
#          present en cas de basculement et de promote
# #########################################################################


# #########################################################################
# #########################################################################
# PARAMETRES GENERIQUES
# #########################################################################
# #########################################################################
listen_addresses = '*'                        # Ecoute toutes les adresses
port = 5432                            # Port de connexion PGSQL
max_connections = 150                        # Nombre maximal de 
connexions simultanées

# #########################################################################
# #########################################################################
# POUR LE DEMARRAGE EN MODE MASTER
# #########################################################################
# #########################################################################

# #########################################################################
# Activation de l'archivage en mode hot_standby
# #########################################################################
archive_mode = on                        # Activation de l'archivage des 
journaux de transactions WAL
wal_level = hot_standby                        # Niveau d'archibage 
hot_standby

# #########################################################################
# Commande d'archivage / Copie du fichier wal si il n'est pas deja archive
# #########################################################################
# archive_command = 'test ! -f /mnt/postgresqlA/data/pg_archive/%f && cp 
%p /mnt/postgresqlA/data/pg_archive/%f'
archive_command = 'cd .'

# #########################################################################
# Forcer generation d'un wal meme si le segment n'est pas complet
# #########################################################################
archive_timeout = 60                        # Au minimum, un fichier wal 
de 16 Mo genere toutes les minutes

# #########################################################################
# Nombre maximal de processus walsender en cours d execution - Nombre de 
serveurs en attente
# #########################################################################
max_wal_senders=1

# #########################################################################
# Nombre de WAL a conserver dans pg_xlog pour que le slave rattrape son 
retard
# #########################################################################
wal_keep_segments = 64

# #########################################################################
# Timeout pour les connexions de replication inactives / Par defaut 60000
# #########################################################################
replication_timeout = 60000         # mseconds            # Termine la 
connexion au bout de 60 secondes

# #########################################################################
# #########################################################################
# POUR LE DEMARRAGE EN MODE SLAVE
# #########################################################################
# #########################################################################

# #########################################################################
# Autorise la connexion au Master pour la replication
# #########################################################################
hot_standby = on

# #########################################################################
# #########################################################################
# OPTIONS PERMETTANT LA REPLICATION SYNCHRONE
# #########################################################################
# #########################################################################

# #########################################################################
# Activation la replication synchrone
# #########################################################################
synchronous_commit = on
# synchronous_standby_names                    # Nom du slave - Genere 
dynamiquement par pacemaker

# #########################################################################
# Delais d'envoi de la confirmation d'ecriture d'un WAL de la part du 
slave au master
# #########################################################################
wal_receiver_status_interval = 2   # seconds

# #########################################################################
# Forcer l'attente de la reponse du slave pour valider une operation
# #########################################################################
synchronous_commit = on

#------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------

# - Where to Log -

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

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

# These are only used if logging_collector is on:
log_directory = '/var/log/postgres'                # directory where log 
files are written,
                                         # can be absolute or relative 
to PGDATA
log_filename = 'postgresql-%a.log' # log file name pattern,
                                         # can include strftime() escapes
#log_file_mode = 0600                   # creation mode for log files,
                                         # begin with 0 to use octal 
notation
log_truncate_on_rotation = on           # If on, an existing log file 
with the
                                         # same name as the new log file 
will be
                                         # truncated rather than 
appended to.
                                         # But such truncation only 
occurs on
                                         # time-driven rotation, not on 
restarts
                                         # or size-driven rotation.  
Default is
                                         # off, meaning append to 
existing files
                                         # in all cases.
log_rotation_age = 1d                  # Automatic rotation of logfiles will
                                         # happen after that time.  0 
disables.
#log_rotation_size = 20MB                # Automatic rotation of 
logfiles will
                                         # happen after that much log 
output.
                                         # 0 disables.

# These are relevant when logging to syslog:
#syslog_facility = 'LOCAL0'
#syslog_ident = 'postgres'

# This is only relevant when logging to eventlog (win32):
#event_source = 'PostgreSQL'

# - When to Log -

#client_min_messages = notice           # values in order of decreasing 
detail:
                                         #   debug5
                                         #   debug4
                                         #   debug3
                                         #   debug2
                                         #   debug1
                                         #   log
                                         #   notice
                                         #   warning
                                         #   error

#log_min_messages = warning             # values in order of decreasing 
detail:
                                         #   debug5
                                         #   debug4
                                         #   debug3
                                         #   debug2
                                         #   debug1
                                         #   info
                                         #   notice
                                         #   warning
                                         #   error
                                         #   log
                                         #   fatal
                                         #   panic

#log_min_error_statement = error        # values in order of decreasing 
detail:
                                         #   debug5
                                         #   debug4
                                         #   debug3
                                         #   debug2
                                         #   debug1
                                         #   info
                                         #   notice
                                         #   warning
                                         #   error
                                         #   log
                                         #   fatal
                                         #   panic (effectively off)

#log_min_duration_statement = -1        # -1 is disabled, 0 logs all 
statements
                                         # and their durations, > 0 logs 
only
                                         # statements running at least 
this number
                                         # of milliseconds


# - What to Log -

#debug_print_parse = off
#debug_print_rewritten = off
#debug_print_plan = off
#debug_pretty_print = on
#log_checkpoints = off
log_connections = on
#log_disconnections = off
#log_duration = off
#log_error_verbosity = default          # terse, default, or verbose 
messages
#log_hostname = off
log_line_prefix = '%m %u %d %x %v'                      # special values:
                                         #   %a = application name
                                         #   %u = user name
                                         #   %d = database name
                                         #   %r = remote host and port
                                         #   %h = remote host
                                         #   %p = process ID
                                         #   %t = timestamp without 
milliseconds
                                         #   %m = timestamp with 
milliseconds
                                         #   %i = command tag
                                         #   %e = SQL state
                                         #   %c = session ID
                                         #   %l = session line number
                                         #   %s = session start timestamp
                                         #   %v = virtual transaction ID
                                         #   %x = transaction ID (0 if none)
                                        #   %q = stop here in non-session
                                         #        processes
                                         #   %% = '%'
                                         # e.g. '<%u%%%d> '
#log_lock_waits = off                   # log lock waits >= deadlock_timeout
log_statement = 'none'                   # none, ddl, mod, all
#log_temp_files = -1                    # log temporary files equal or 
larger
                                         # than the specified size in 
kilobytes;
                                         # -1 disables, 0 logs all temp 
files
log_timezone = 'UTC'

# ############
# Tunning SMU
# ############
shared_buffers=2600MB
work_mem=128MB
effective_io_concurrency=1000
effective_cache_size=12GB
checkpoint_segments=16
wal_buffers=64MB
include '/mnt/postgresql/tmp/rep_mode.conf' # added by pgsql RA
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.