mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Add DISCARD SEQUENCES command.
DISCARD ALL will now discard cached sequence information, as well. Fabrízio de Royes Mello, reviewed by Zoltán Böszörményi, with some further tweaks by me.
This commit is contained in:
@ -1602,3 +1602,19 @@ seq_redo(XLogRecPtr lsn, XLogRecord *record)
|
||||
|
||||
pfree(localpage);
|
||||
}
|
||||
|
||||
/*
|
||||
* Flush cached sequence information.
|
||||
*/
|
||||
void
|
||||
ResetSequenceCaches(void)
|
||||
{
|
||||
SeqTableData *next;
|
||||
|
||||
while (seqtab != NULL)
|
||||
{
|
||||
next = seqtab->next;
|
||||
free(seqtab);
|
||||
seqtab = seqtab->next;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user