mirror of
https://github.com/HypoPG/hypopg
synced 2026-05-23 09:08:45 +00:00
Check for interrupts in the oid generator loop.
As this loop can take a significant amount of time to find a suitable oid in some extreme case, it's important to make sure that the query is cancellable.
This commit is contained in:
parent
2bd376d6bd
commit
4b3d55df85
1 changed files with 3 additions and 0 deletions
3
hypopg.c
3
hypopg.c
|
|
@ -24,6 +24,7 @@
|
|||
#include "utils/lsyscache.h"
|
||||
#endif
|
||||
#include "executor/spi.h"
|
||||
#include "miscadmin.h"
|
||||
#include "utils/elog.h"
|
||||
|
||||
#include "include/hypopg.h"
|
||||
|
|
@ -229,6 +230,8 @@ hypo_getNewOid(Oid relid)
|
|||
|
||||
while(!OidIsValid(newoid))
|
||||
{
|
||||
CHECK_FOR_INTERRUPTS();
|
||||
|
||||
if (!OidIsValid(last_oid))
|
||||
newoid = last_oid = min_fake_oid;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue