diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-05-02 10:41:48 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-05-02 10:41:48 -0400 |
commit | 3d092fe5409b98272ddd6e623b657308a3c5f004 (patch) | |
tree | 4155097b18e2045d6508833462a3edf6b9fc9a58 /src/backend/utils/adt/array_userfuncs.c | |
parent | a35ac7c4e3ccf93876b4652d94a418fc82e0eda3 (diff) | |
download | postgresql-3d092fe5409b98272ddd6e623b657308a3c5f004.tar.gz postgresql-3d092fe5409b98272ddd6e623b657308a3c5f004.zip |
Avoid unnecessary catalog updates in ALTER SEQUENCE
ALTER SEQUENCE can do nontransactional changes to the sequence (RESTART
clause) and transactional updates to the pg_sequence catalog (most other
clauses). When just calling RESTART, the code would still needlessly do
a catalog update without any changes. This would entangle that
operation in the concurrency issues of a catalog update (causing either
locking or concurrency errors, depending on how that issue is to be
resolved).
Fix by keeping track during options parsing whether a catalog update is
needed, and skip it if not.
Reported-by: Jason Petersen <jason@citusdata.com>
Diffstat (limited to 'src/backend/utils/adt/array_userfuncs.c')
0 files changed, 0 insertions, 0 deletions