public inbox for [email protected]  
help / color / mirror / Atom feed
Subscribe to mailing list - General Question
2+ messages / 2 participants
[nested] [flat]

* Subscribe to mailing list - General Question
@ 2024-08-02 03:53 Sindhu Selvaraj <[email protected]>
  2024-08-02 15:09 ` Re: Subscribe to mailing list - General Question Adrian Klaver <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Sindhu Selvaraj @ 2024-08-02 03:53 UTC (permalink / raw)
  To: [email protected]; +Cc: Gurmokh Sangha <[email protected]>

In 15.7 and 16.3 Release Notes, I found a change to an unlogged table's
sequence.

Make ALTER TABLE ... ADD COLUMN create identity/serial sequences with the
same persistence as their owning tables (Peter Eisentraut)

CREATE UNLOGGED TABLE will make any owned sequences be unlogged too. ALTER
TABLE missed that consideration, so that an added identity column would
have a logged sequence, which seems pointless.

Major version upgrade to 15.7 or 16.3 is failing on pg_restore step with
following error,

pg_restore: creating TABLE "public.queue_context"

pg_restore: creating SEQUENCE "public.queue_context_id_seq"

pg_restore: while PROCESSING TOC:

pg_restore: from TOC entry 200; 1259 <NUMBER> SEQUENCE queue_context_id_seq
sindhu.selvaraj

pg_restore: error: could not execute query: ERROR:  unexpected request for
new relfilenode in binary upgrade mode

Command was:

-- For binary upgrade, must preserve pg_class oids and relfilenodes

SELECT
pg_catalog.binary_upgrade_set_next_heap_pg_class_oid('<NUMBER>'::pg_catalog.oid);

SELECT
pg_catalog.binary_upgrade_set_next_heap_relfilenode('<NUMBER>'::pg_catalog.oid);

ALTER TABLE "public"."queue_context" ALTER COLUMN "id" ADD GENERATED BY
DEFAULT AS IDENTITY (

    SEQUENCE NAME "public"."queue_context_id_seq"

    START WITH 1

    INCREMENT BY 1

    NO MINVALUE

    NO MAXVALUE

    CACHE 1

);

ALTER SEQUENCE "public"."queue_context_id_seq" SET LOGGED;


This has been spotted in local postgres installed in MAC as well as in AWS
RDS.

We had to change the unlogged table to logged and then upgrade.

I am reporting this as a bug. Please keep us updated.


Regards,

Sindhu

[image: SB Logo]

SINDHU SELVARAJ

POSTGRESQL DBA

STARLING BANK


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Subscribe to mailing list - General Question
  2024-08-02 03:53 Subscribe to mailing list - General Question Sindhu Selvaraj <[email protected]>
@ 2024-08-02 15:09 ` Adrian Klaver <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Adrian Klaver @ 2024-08-02 15:09 UTC (permalink / raw)
  To: Sindhu Selvaraj <[email protected]>; [email protected]; +Cc: Gurmokh Sangha <[email protected]>

On 8/1/24 20:53, Sindhu Selvaraj wrote:
> In 15.7 and 16.3 Release Notes, I found a change to an unlogged table's 
> sequence.
> 

> This has been spotted in local postgres installed in MAC as well as in 
> AWS RDS.
> 
> We had to change the unlogged table to logged and then upgrade.
> 
> I am reporting this as a bug. Please keep us updated.

That should be done here:

https://www.postgresql.org/account/submitbug/

FYI, you will need to set up a community account to do that.

> 
> 
> Regards,
> 
> Sindhu
> 
> SB Logo
> 
> SINDHU SELVARAJ
> 
> POSTGRESQL DBA
> 
> STARLING BANK
> 
> 

-- 
Adrian Klaver
[email protected]







^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-08-02 15:09 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-08-02 03:53 Subscribe to mailing list - General Question Sindhu Selvaraj <[email protected]>
2024-08-02 15:09 ` Adrian Klaver <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox