From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | kbrannen(at)pwhome(dot)com |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pg_stat_tmp and pg_upgrade |
Date: | 2017-10-02 22:36:30 |
Message-ID: | 20171002223630.GA19339@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Sep 28, 2017 at 08:02:44AM -0700, kbrannen(at)pwhome(dot)com wrote:
> With Pg10.0 coming, I have a question about pg_stat_tmp and upgrades that I'm hoping I can get some advice on.
>
> Historically, we've created a tmpfs "disk" and mounted it on $PGDATA/pg_stat_tmp and then started Pg. For
> most situations, this works well. However, we have one situation where it doesn't. Therefore, we've decided
> to put pg_stat_tmp outside of $PGDATA.
>
> OTOH, it occurs to me that when we run pg_upgrade, we're going to have 2 Pg's running at the same time. So
> my concern is that if both new and old have "stats_temp_directory = '/db/pg_stat_tmp'" in their
> postgresql.conf, are there going to be conflicts and "bad things" happen? Or is there some sort of
> versioning within that area that will keep stuff separate and we'll be OK?
>
> I'm concerned because I don't see anything like versioning when I look in the "dir", so if both of them try
> to create a "global.stat" then it seems like "bad things" could happen.
>
> OTOH, it's only stats and only an upgrade, so would it be better to make sure that the new version doesn't
> use that (that config isn't set so it uses the dir in PGDATA) and then change it over once the upgrade is
> done or what?
>
> I could see where the upgrade process wouldn't do anything with stats while the 2 servers are running (but
> only after the upgrade is done) so this might not matter. I will also say that I don't see anything like
> this mentioned in the 10.0 docs for pg_upgrade.
>
> I don't think it matters, but we'll be going from 9.5.1 to 10.0.
pg_upgrade never runs the old and new servers at the same time. I am
not sure if that would be OK, but I have never heard of problems related
to this. I am afraid you will just need to test it.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
From | Date | Subject | |
---|---|---|---|
Next Message | Laurenz Albe | 2017-10-03 07:38:31 | Re: Checkpoint write time - anything unusual? |
Previous Message | Nico Williams | 2017-10-02 18:14:54 | Re: time series data |