From: | Johannes Graën <johannes(at)selfnet(dot)de> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: found xmin x from before relfrozenxid y |
Date: | 2018-10-21 14:57:15 |
Message-ID: | 8d5a4917-c782-4250-819e-2a1effc53f31@selfnet.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Thanks for your answer.
On 21/10/2018 16.24, Tom Lane wrote:
> In the meantime, the only answer I can think of offhand is to manually
> do VACUUM FREEZE on each of your MVs, and then refresh anything that
> shows up with an error.
Since I have so many of them, I decided to go for a quick-and-dirty
solution (what about REFRESH ALL MATERIALIZED VIEWS in the future?):
> DO
> $$
> DECLARE command text;
> BEGIN
> FOR command IN SELECT 'REFRESH MATERIALIZED VIEW '|| nspname||'.'||relname||';'
> FROM pg_catalog.pg_class c
> LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
> WHERE c.relkind = 'm'
> LOOP
> RAISE NOTICE '%', command;
> EXECUTE command;
> END LOOP;
> END
> $$;
From | Date | Subject | |
---|---|---|---|
Next Message | Tim Clarke | 2018-10-21 18:28:52 | Re: archive items not in correct section order |
Previous Message | Tom Lane | 2018-10-21 14:24:16 | Re: found xmin x from before relfrozenxid y |
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2018-10-21 15:03:30 | Re: More issues with pg_verify_checksums and checksum verification in base backups |
Previous Message | Tom Lane | 2018-10-21 14:24:16 | Re: found xmin x from before relfrozenxid y |