From: | tushar <tushar(dot)ahuja(at)enterprisedb(dot)com> |
---|---|
To: | 曾文旌 <wenjing(dot)zwj(at)alibaba-inc(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Prabhat Sahu <prabhat(dot)sahu(at)enterprisedb(dot)com> |
Cc: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, 蔡松露(子嘉) <zijia(at)taobao(dot)com>, "Cai, Le" <le(dot)cai(at)alibaba-inc(dot)com>, 萧少聪(铁庵) <shaocong(dot)xsc(at)alibaba-inc(dot)com> |
Subject: | Re: [Proposal] Global temporary tables |
Date: | 2020-04-08 10:34:20 |
Message-ID: | 3aabfdf7-aa21-7658-d535-72a65948277f@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 4/7/20 2:27 PM, 曾文旌 wrote:
> Vacuum full GTT, cluster GTT is already
> supported in global_temporary_table_v24-pg13.patch.
Please refer this below scenario , where pg_upgrade is failing
1)Server is up and running (./pg_ctl -D data status)
2)Stop the server ( ./pg_ctl -D data stop)
3)Connect to server using single user mode ( ./postgres --single -D data
postgres) and create a global temp table
[tushar(at)localhost bin]$ ./postgres --single -D data1233 postgres
PostgreSQL stand-alone backend 13devel
backend> create global temp table t(n int);
--Press Ctl+D to exit
4)Perform initdb ( ./initdb -D data123)
5.Run pg_upgrade
[tushar(at)localhost bin]$ ./pg_upgrade -d data -D data123 -b . -B .
--
--
--
Restoring database schemas in the new cluster
postgres
*failure*
Consult the last few lines of "pg_upgrade_dump_13592.log" for
the probable cause of the failure.
Failure, exiting
log file content -
[tushar(at)localhost bin]$ tail -20 pg_upgrade_dump_13592.log
pg_restore: error: could not execute query: ERROR: pg_type array OID
value not set when in binary upgrade mode
Command was:
-- For binary upgrade, must preserve pg_type oid
SELECT
pg_catalog.binary_upgrade_set_next_pg_type_oid('13594'::pg_catalog.oid);
-- For binary upgrade, must preserve pg_class oids
SELECT
pg_catalog.binary_upgrade_set_next_heap_pg_class_oid('13593'::pg_catalog.oid);
CREATE GLOBAL TEMPORARY TABLE "public"."t" (
"n" integer
)
WITH ("on_commit_delete_rows"='false');
-- For binary upgrade, set heap's relfrozenxid and relminmxid
UPDATE pg_catalog.pg_class
SET relfrozenxid = '0', relminmxid = '0'
WHERE oid = '"public"."t"'::pg_catalog.regclass;
--
regards,tushar
EnterpriseDB https://www.enterprisedb.com/
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2020-04-08 10:51:05 | Re: [PATCH] Incremental sort (was: PoC: Partial sort) |
Previous Message | Ashutosh Bapat | 2020-04-08 10:18:53 | Re: [HACKERS] advanced partition matching algorithm for partition-wise join |