Skip to content

seed required when connecting to PostgreSQL in multisession plan? #672

Answered by HenrikBengtsson
bartekch asked this question in Q&A
Discussion options

You must be logged in to vote

My best guess is that RPostgres, or one of its package dependencies, generates a random number when loaded or during initialization of the database, e.g. generate a random TCP port, a random temporary variable, or similar. It's not super common, but I've seen a few packages doing this. Sometimes this only happens once per R process, meaning if you call the same code multiple times, it only happens the first time, which could explain why you don't see it when using the 'sequential' backend; the RNG has been used before the future is evaluated.

To help narrow in on code that generates random numbers (i.e. uses the RNG) when running interactively, see https://www.jottr.org/2020/09/21/detect-…

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@HenrikBengtsson
Comment options

@krlmlr
Comment options

@bartekch
Comment options

@krlmlr
Comment options

@bartekch
Comment options

Answer selected by bartekch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
3 participants