pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Willy-Bas Loos <willybas@gmail.com>
To: pgsql-general@postgresql.org, pgsql-admin <pgsql-admin@postgresql.org>
Subject: [GENERAL]auto vacuum during restore
Date: Tue, 26 Apr 2011 17:36:49 +0200
Message-ID: <BANLkTiksP9XQ+njx7s5VYb4FFi7U6eU5dA@mail.gmail.com> (raw)

Hi,

i've tested on 8.3 and 8.4 and i found that autovacuum works during restore
uin my test scenario, which is:
a new database wit two tables. tab1 has 1M recs, tab2 has 10 recs.
When i drop the database and restore, pg_stat_all tables tells me good
estimations for the number of live tuples.

But on a copy of a live database (postgres 8.3), there are zeros for
n_live_tup on tables that do contain records.
When i do an ANALYZE (without vacuum) these remain 0. When i do VACUUM
ANALYZE, they are filled in correctly.

I don't get it, they should have been analyzed at restore, should they not?

Cheers,

WBL

-----------non default postgresql.conf settings below------------
$ grep ^[^#] /etc/postgresql/8.3/oz/postgresql.conf|grep -e ^[^[:space:]]
data_directory = '/data/postgresql/8.3/oz' # use data in another directory
hba_file = '/etc/postgresql/8.3/oz/pg_hba.conf' # host-based authentication
file
ident_file = '/etc/postgresql/8.3/oz/pg_ident.conf' # ident configuration
file
external_pid_file = '/var/run/postgresql/8.3-oz.pid' # write an extra PID
file
listen_addresses = '*' # what IP address(es) to listen on;
port = 5434 # (change requires restart)
max_connections = 100 # (change requires restart)
unix_socket_directory = '/var/run/postgresql' # (change requires restart)
tcp_keepalives_idle = 120 # TCP_KEEPIDLE, in seconds;
shared_buffers = 2048MB # min 128kB or max_connections*16kB
work_mem = 50MB # min 64kB
maintenance_work_mem = 200MB # min 1MB
max_fsm_pages = 3000000 # min max_fsm_relations*16, 6 bytes each
max_fsm_relations = 10000 # min 100, ~70 bytes each
synchronous_commit = off # immediate fsync at commit
wal_writer_delay = 500ms # 1-10000 milliseconds
commit_delay = 500 # range 0-100000, in microseconds
effective_cache_size = 4096MB
default_statistics_target = 100 # range 1-1000
log_min_duration_statement = 300000 # -1 is disabled, 0 logs all statements
log_line_prefix = '%t ip:%h ' # special values:
datestyle = 'iso, mdy'
lc_messages = 'en_US.UTF-8' # locale for system error message
lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
lc_numeric = 'en_US.UTF-8' # locale for number formatting
lc_time = 'en_US.UTF-8' # locale for time formatting
default_text_search_config = 'pg_catalog.english'



-- 
"Patriotism is the conviction that your country is superior to all others
because you were born in it." -- George Bernard Shaw

view thread (4+ messages)  latest in thread

Message-ID: <BANLkTiksP9XQ+njx7s5VYb4FFi7U6eU5dA@mail.gmail.com>
Permalink:  ../BANLkTiksP9XQ+njx7s5VYb4FFi7U6eU5dA@mail.gmail.com/
Also on:    postgresql.org/message-id/BANLkTiksP9XQ+njx7s5VYb4FFi7U6eU5dA@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: willybas@gmail.com
  Subject: Re: [GENERAL]auto vacuum during restore
  In-Reply-To: <BANLkTiksP9XQ+njx7s5VYb4FFi7U6eU5dA@mail.gmail.com>
  References: <BANLkTiksP9XQ+njx7s5VYb4FFi7U6eU5dA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox