git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: bab588c) | patch
Unlogged sequences
Thu, 7 Apr 2022 14:13:23 +0000 (16:13 +0200)
Thu, 7 Apr 2022 14:18:00 +0000 (16:18 +0200)
commit 344d62fb9a978a72cf8347f0369b9ee643fd0b31
Unlogged sequences

Add support for unlogged sequences. Unlike for unlogged tables, this
is not a performance feature. It allows sequences associated with
unlogged tables to be excluded from replication.

A new subcommand ALTER SEQUENCE ... SET LOGGED/UNLOGGED is added.

An identity/serial sequence now automatically gets and follows the
persistence level (logged/unlogged) of its owning table. (The
sequences owned by temporary tables were already temporary through the
separate mechanism in RangeVarAdjustRelationPersistence().) But you
can still change the persistence of an owned sequence separately.
Also, pg_dump and pg_upgrade preserve the persistence of existing
sequences.

Discussion: https://www.postgresql.org/message-id/flat/04e12818-2f98-257c-b926-2845d74ed04f%402ndquadrant.com
16 files changed:
doc/src/sgml/ref/alter_sequence.sgml diff | blob | blame | history
doc/src/sgml/ref/alter_table.sgml diff | blob | blame | history
doc/src/sgml/ref/create_sequence.sgml diff | blob | blame | history
doc/src/sgml/ref/create_table.sgml diff | blob | blame | history
doc/src/sgml/ref/pg_dump.sgml diff | blob | blame | history
src/backend/commands/sequence.c diff | blob | blame | history
src/backend/commands/tablecmds.c diff | blob | blame | history
src/backend/parser/parse_utilcmd.c diff | blob | blame | history
src/bin/pg_dump/pg_dump.c diff | blob | blame | history
src/bin/psql/describe.c diff | blob | blame | history
src/bin/psql/tab-complete.c diff | blob | blame | history
src/include/commands/sequence.h diff | blob | blame | history
src/test/recovery/t/014_unlogged_reinit.pl diff | blob | blame | history
src/test/regress/expected/alter_table.out diff | blob | blame | history
src/test/regress/expected/sequence.out diff | blob | blame | history
src/test/regress/sql/sequence.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /