How to select for update using spring data and postgresql? -
i have spring boot application , postgresql database. in database have table column pdfgenerated
, in application have scheduled task selects 10 rows table have column set false, generates pdf them , sets column true.
my problem arises when try deploy 2 instances of application on different servers (both connected same database). how can 1 tell spring use database's select update mechanism when second instance of application performs it's query other rows not yet selected first instance of application ?
Comments
Post a Comment