Skip to content

Commit a2692fa

Browse files
authored
chore: add log entries warning of slow bns reindex (#1090)
1 parent a85024c commit a2692fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/import-v1/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ export async function importV1BnsData(db: PgDataStore, importDir: string) {
430430
const client = await db.pool.connect();
431431
try {
432432
await client.query('BEGIN');
433-
// Temporarily disable BNS table indices to speed up INSERTs.
433+
logger.info(`Disabling BNS table indices temporarily for a faster import`);
434434
await client.query(`
435435
UPDATE pg_index
436436
SET indisready = false, indisvalid = false
@@ -476,7 +476,7 @@ export async function importV1BnsData(db: PgDataStore, importDir: string) {
476476
};
477477
await db.updateConfigState(updatedConfigState, client);
478478

479-
// Re-enable indices
479+
logger.info(`Re-indexing BNS tables. This might take a while...`);
480480
await client.query(`REINDEX TABLE subdomains`);
481481
await client.query(`REINDEX TABLE zonefiles`);
482482
await client.query(`REINDEX TABLE namespaces`);

0 commit comments

Comments
 (0)