| From: | Japin Li <japinli(at)hotmail(dot)com> |
|---|---|
| To: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
| Cc: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Kirk Wolak <wolakk(at)gmail(dot)com> |
| Subject: | Re: Global temporary tables |
| Date: | 2026-07-15 06:27:55 |
| Message-ID: | SY7PR01MB109217D262A04814411076B80B6F82@SY7PR01MB10921.ausprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, 14 Jul 2026 at 14:38, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> wrote:
> Hello!
>
> 2. And I also have some other questions above global temp sequences:
>
> CREATE GLOBAL TEMP SEQUENCE s;
> CREATE GLOBAL TEMP TABLE t (a int, b serial);
>
> BEGIN;
> SELECT nextval('s'); -- 1
> SELECT nextval('s'); -- 2
> SELECT nextval('s'); -- 3
> ROLLBACK;
> SELECT nextval('s'); -- 1 again, is this intended?
>
> also within a single transaction with savepoints:
>
> BEGIN;
> SAVEPOINT sp;
> INSERT INTO t(a) VALUES (1); -- b = 1
> ROLLBACK TO sp;
> INSERT INTO t(a) VALUES (2); -- b = 1 again
> COMMIT;
> SELECT a, b FROM t; -- 2,1 ?
>
Per [1], this does not seem to be the expected outcome.
--
Regards,
Japin Li
ChengDu WenWu Information Technology Co., Ltd.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Kapila | 2026-07-15 06:28:01 | Re: walsummarizer can get stuck when switching timelines |
| Previous Message | Ewan Young | 2026-07-15 06:27:21 | Re: Fix duplicate detection for null-treatment window functions |