1
0
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:
Robert Haas
2013-10-03 16:17:18 -04:00
parent c64e68fd9f
commit d90ced8bb2
10 changed files with 53 additions and 4 deletions

View File

@ -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;
}
}