| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Fix propagation of persistence to sequences in ALTER TABLE / ADD COLUMN |
| Date: | 2024-02-09 07:19:55 |
| Message-ID: | 7e0dcf16-60c4-4cf6-81b9-9e51b397a355@eisentraut.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 08.02.24 07:04, Ashutosh Bapat wrote:
> The patch looks ok.
>
> + seqstmt->sequence->relpersistence = cxt->rel ?
> cxt->rel->rd_rel->relpersistence : cxt->relation->relpersistence;
> +
>
> This condition looks consistent with the other places in the code
> around line 435, 498.
Ah good, that pattern already existed.
> But I was worried that cxt->rel may not get
> latest relpersistence if the ALTER TABLE changes persistence as well.
> Added a test (0002) which shows that ctx->rel has up-to-date
> relpersistence. Also added a few other tests. Feel free to
> include/reject them while committing.
Yes, this additional coverage seems good. Committed with your additions.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2024-02-09 07:22:35 | Re: Simplify documentation related to Windows builds |
| Previous Message | Zhijie Hou (Fujitsu) | 2024-02-09 07:08:01 | RE: Synchronizing slots from primary to standby |