@@ -332,48 +332,30 @@ SELECT * FROM bdr.sequence_alloc
332
332
(1 row)
333
333
```
334
334
335
- To see the ranges currently assigned to a given sequence on each node, use
336
- these queries:
335
+ To see the ranges currently assigned to a given sequence on each node, execute the function
336
+ [ ` bdr.galloc_chunk_info ` ] ( reference/sequences/#bdrgalloc_chunk_info ) .
337
337
338
- * Node ` Node1 ` is using range from ` 333 ` to ` 2000333 ` .
338
+ * Node ` Node1 ` is using range from ` 334 ` to ` 2000333 ` .
339
339
340
340
``` sql
341
- SELECT last_value AS range_start, log_cnt AS range_end
342
- FROM categories_category_seq WHERE ctid = ' (0,2)' ; -- first range
343
- range_start | range_end
341
+ SELECT * FROM bdr .galloc_chunk_info (' categories_category_seq' );
342
+ chunk_start | chunk_end
344
343
-- -----------+-----------
345
344
334 | 1000333
346
- (1 row)
347
-
348
- SELECT last_value AS range_start, log_cnt AS range_end
349
- FROM categories_category_seq WHERE ctid = ' (0,3)' ; -- second range
350
- range_start | range_end
351
- -- -----------+-----------
352
345
1000334 | 2000333
353
- (1 row )
346
+ (2 rows )
354
347
```
355
348
356
349
* Node ` Node2 ` is using range from ` 2000334 ` to ` 4000333 ` .
357
350
358
351
``` sql
359
- SELECT last_value AS range_start, log_cnt AS range_end
360
- FROM categories_category_seq WHERE ctid = ' (0,2)' ; -- first range
361
- range_start | range_end
352
+ SELECT * FROM bdr .galloc_chunk_info (' categories_category_seq' );
353
+ chunk_start | chunk_end
362
354
-- -----------+-----------
363
355
2000334 | 3000333
364
- (1 row)
365
-
366
- SELECT last_value AS range_start, log_cnt AS range_end
367
- FROM categories_category_seq WHERE ctid = ' (0,3)' ; -- second range
368
- range_start | range_end
369
- -- -----------+-----------
370
356
3000334 | 4000333
371
357
```
372
358
373
- !!! NOTE
374
- You can't combine it to a single query (like ` WHERE ctid IN ('(0,2)', '(0,3)') ` ),
375
- as that still shows only the first range.
376
-
377
359
When a node finishes a chunk, it asks a consensus for a new one and gets the
378
360
first available. In the example, it's from 4000334 to 5000333. This is
379
361
the new reserved chunk and starts to consume the old reserved chunk.
0 commit comments