Questions tagged [r2dbc-postgresql]

For questions regarding the PostgreSQL implementation of the R2DBC SPI. See also tags "r2dbc" and "postgresql".

Refers to the PostgreSQL implementation of the R2DBC SPI. Refer to the tag info for r2dbc for information on Reactive Relational Database Connectivity Service Provider Interface and refer to tag info for postgresql for information on PostgreSQL object-relational database management system.

103 questions
1
vote
0 answers

Thread pool in r2dbc-postgresql

Can you help me understand? There is a Spring Boot (3.0.2) service with Spring Data R2DBC repository and r2dbc-postgresql driver. By default, a pool of 10 connections and 10 reactor-tcp-nio threads is created. I have enabled logging of R2DBC queries…
1
vote
0 answers

TransientDataAccessResourceException - R2DBC pgdb connection remains in idle in transaction

I have a spring-boot application where using webflux and r2dbc-postgres. I have discovered a strange issue when trying to do some db operations in a flatMap(). Code example: @Transactional public Mono insertDummyFooBars() { return…
1
vote
0 answers

Spring R2DBC Postgres Row Level Security

I'm trying to implement Postgres Row Level Security on my app that uses R2DBC. I found this AWS post that implements this but uses a non-reactive approach. I'm having problems converting this to a reactive approach since I can't find a class…
kylie.zoltan
  • 377
  • 3
  • 15
1
vote
2 answers

Insert Query using @Query in R2DBCRepository SpringWebFlux not Working

Seems Composite Key/@Embedded are not supported in R2DBC - link , I am trying to insert data using @Query annotation like below. @Repository("testRepository") public interface TestRepository extends R2dbcRepository
1
vote
1 answer

R2DBC Querying From Multiple Tables With Sorting and Pagination

I am trying to create endpoint using spring webflux. The result of endpoint to query from several tables, and most of values in where clause are optional. (example query is provided in the bottom). Sorting column and direction is provided by user,…
1
vote
0 answers

Double nested entities in r2dbc for postgresql

I'm facing an issue when I'm trying to save an Expense onto the Postgresdb. When I try to save the entity I'm getting the following error, which dosen't say exactly what the problem is. java.lang.IllegalArgumentException: Cannot encode parameter of…
1
vote
2 answers

Kotlin Micronaut Data with r2dbc fails while using Postgres jsonb type

I am trying to set up Micronaut Data r2dbc with Postgres but it fails with io.r2dbc.postgresql.ExceptionFactory$PostgresqlBadGrammarException: [42804] column blob is of type jsonb but expression is of type character…
jay
  • 43
  • 3
1
vote
1 answer

One-to-Many relational mappings are not executing correctly in spring reactive web-flux

I am trying out a spring boot app using web-flux, and r2dbc for PostgreSQL, initially I could do few POST, GET, PUT, DELETE actions. However, when I tried to link customer table with subscription table, errors started to show up. I am pasting these…
1
vote
1 answer

R2DBC TransientDataAccessResourceException: Row with Id [...] does not exist

As part of R2DBC learning process, i have a complex scenario of creating related entities as part of creating main entities. I am trying to create a Film entity and its related entities. My request is something like this { "title" : "Star Wars: The…
Harry
  • 528
  • 1
  • 5
  • 21
1
vote
1 answer

R2DBC Postgres SQL Enum Issue

As part of learning r2DBC i have come across an issue facing with Enum conversion. I am using PostgreSQL here. When reading data for Film where rating is PG-13 and NC-17( anything with dash ) i am facing issues. Below is my schema for table create…
Harry
  • 528
  • 1
  • 5
  • 21
1
vote
0 answers

How to insert an embedded entity into the database using R2DBC repository

I am using the R2DBC repository for Reactive operations. I am trying to insert a record that has aggregated java object in it. e.g. Person is an entity inside that I have Address is a different embedded class reference. Now, I want to insert the…
1
vote
1 answer

What's the bottleneck in Spring r2dbc database connection?

I've set up a sample project using spring boot, webflux, and r2dbc. I've been able to stream rows from a postgres db table to the client. Is there a memory bottleneck on this server implementation (for storing the results of the query)? Do the rows…
1
vote
0 answers

R2dbcRepository Return Nothing

I'm trying to get data from my UserRepository that extends R2dbcRepository like the code below public interface UserRepository extends R2dbcRepository { Mono findByEmail(String email); } this repository works fine…
fahmiduldul
  • 924
  • 7
  • 18
1
vote
1 answer

Why is the query result mapped with a null value for COUNT(*)?

interface TaskReviewRepository : CoroutineCrudRepository { @Query( """ SELECT task_id, AVG(rating) as avgRating, COUNT(*) as reviewsCount FROM task_review WHERE task_id IN (:taskIds) GROUP BY task_id """ …
Stuck
  • 11,225
  • 11
  • 59
  • 104
1
vote
0 answers

How to create PostgreSQL savePoint with Reactor and Spring

io.r2dbc.spi.Connection and PostgresqlConnection have createSavepoint, releaseSavepoint and rollbackTransactionToSavepoint methods. How can I use these method by having R2dbcTransactionManager and TransactionalOperator? I want to create an…