BDR Global Sequences

Started by Paul Jonesover 11 years ago3 messagesgeneral
Jump to latest
#1Paul Jones
pbj@cmicdo.com

I have a question about BDR Global Sequences.

I've been playing with BDR on PG 9.4beta2, built from source from the
2nd Quadrant GIT page (git://git.postgresql.org/git/2ndquadrant_bdr.git).

When trying a 1000000 row \copy-in, letting PG choose the global sequence
values, I get "ERROR: could not find free sequence value for global
sequence public.myseq", as documented...no surprise there. However, the
number of rows I can load before the error varies wildly with each trial.

Is there way to increase a global sequence's reservation block for each
node so that I can tell the nodes, "I'm going to load 100M rows now so
you should get ready for that."?

PJ

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Andres Freund
andres@anarazel.de
In reply to: Paul Jones (#1)
Re: BDR Global Sequences

Hi,

On 2014-09-29 13:52:52 -0700, pbj@cmicdo.com wrote:

I have a question about BDR Global Sequences.

I've been playing with BDR on PG 9.4beta2, built from source from the
2nd Quadrant GIT page (git://git.postgresql.org/git/2ndquadrant_bdr.git).

When trying a 1000000 row \copy-in, letting PG choose the global sequence
values, I get "ERROR: could not find free sequence value for global
sequence public.myseq", as documented...no surprise there. However, the
number of rows I can load before the error varies wildly with each trial.

Yea, it depends on how quick the refilling starts and how quickly it can
keep up. The next version hopefull will start to fill up a bit quicker.

Is there way to increase a global sequence's reservation block for each
node so that I can tell the nodes, "I'm going to load 100M rows now so
you should get ready for that."?

Not yet, but we're planning to add that.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Paul Jones
pbj@cmicdo.com
In reply to: Andres Freund (#2)
Re: BDR Global Sequences

Hi Andres,

Hi,

On 2014-09-29 13:52:52 -0700, pbj@cmicdo.com wrote:

I have a question about BDR Global Sequences.

[deleted]

Is there way to increase a global sequence's reservation block for each
node so that I can tell the nodes, "I'm going to load 100M rows now so
you should get ready for that."?

Not yet, but we're planning to add that.

Good to hear. In the meantime, is there something I can hack to force
the nodes to make a sequence allocation of my choosing (even if just
hardwired?) I was playing with start_elections_sql where it says:

generate_series(\n"
current_max,\n"
-- 1000 is the chunk size, -1 is to get < instead <= out of generate_series\n"
current_max + 1000 * (5 - open_seq_chunks) - 1,\n"
1000) chunk_start\n"

and hoping that bumping up the 1000 would help, but apparently not.

PJ

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general