Neon

N

Neon

The official Neon Database Discord

Join

šŸ™ļ½œfeedback

ā“ļ½œquestions-and-answers

🐘|postgres

rival-black
rival-black12/24/2024

Answered: Unexpected behavior with pg_trgm and special characters

Hello guys. First, thanks for the awesome work. I have encountered some inconsistency regarding the pg_tgrm extension on Neon. When I use the show_trgm, it has weird behaviors when using Japanese characters: ...
national-gold
national-gold12/23/2024

Does an AFTER UPDATE trigger happen within the original table update transaction?

Q1: If an AFTER UPDATE trigger fails, will it roll back the original table update? Q2: My application performs a database transaction that updates entries in two different PostgreSQL tables simultaneously. I want to create a trigger that calculates some data (using information from both tables) and inserts a new entry into a log table. If I create an AFTER UPDATE trigger on one of the tables, can I assume that both tables have already been updated by the time the trigger executes?...
unwilling-turquoise
unwilling-turquoise12/19/2024

Connection limit being reached too soon

I'm having issues with connection limit. I'm using 0.25 CU and Paid Plan. The SHOW max_connections; returns 112. I'm using pgbouncer, 3 services, each service has its own username. Sometimes I get these connections spikes of 55 connections (picture), and when this happens, no service can create more connections....
No description
equal-aqua
equal-aqua12/19/2024

How to efficiently enforce daily notification limits for users in a high-volume notification system?

I'm building a notification service where users have a daily limit on the number of notifications they can receive (e.g., 50 notifications/day). Currently, I check the daily limit in the database every time a notification is sent. However, with high notification volumes, this approach adds significant overhead. I’m considering using Redis for caching limits and counts, but I’m not sure about the best practices for: 1. Storing and incrementing notification counts in Redis....
useful-bronze
useful-bronze12/18/2024

Advice for local development

I am really enjoying using NeonDB however find I am having issues with the number of compute hours in the non-defuault branches (free tier). My workflow is currently the following: - develop locally using a branch called local-dev - when work is ready run test in CI/CD using preview branches (with vercel)...
mere-teal
mere-teal12/17/2024

What is expected response time vs dedicated hosted Postgres?

At the moment I am doing some performance analysis of how Neon stacks up vs our existing Heroku Postgres DB. Looking at the stats it looks like Neon queries are taking can take 20ms to respond versus 1ms in Heroku, sometimes longer. Is this performance difference expected? Are there any recommendations to help improve the performance? I have the Neon DB start at 16GB on wake to mirror our Heroku instance to avoid autoscaling delays during processing. The performance seems consistent even trying...
rare-sapphire
rare-sapphire12/17/2024

HTTP 423 while generating endpoint for branch that was just created.

Hello! I am using the API to generate branches in one of my applications. I first create the branch and then create an endpoint to be able to get a connection URL. My call to generate the endpoint is failing with a 423: ```ts...
causal-orange
causal-orange12/16/2024

Neonctl failing in github actions

Just started today for me, but when running the reset branch action i'm getting this error before any other output comes out: ERROR: The request could not be authorized due to an internal error. It looks like I'm not the only one this started happening to: https://discord.com/channels/1176467419317940276/1318273579997200395
optimistic-gold
optimistic-gold12/16/2024

Non-default branch compute hours limit on free plan prevents use of default branch compute hours

I reached the free-tier 5 compute hour limit for non-default branches, so I am trying to swap to the default main branch. However, all default branch computing seems to be suspended as well. I double-checked my env file's database url to ensure that I am targeting the main default branch, so I believe it is not a user error.
No description
flat-fuchsia
flat-fuchsia12/15/2024

Says limit reached when literally im 1% only there

I have made this db around 2 days ago and barely have anything in there why does this say i have reached my limit and not allowing for more - what is wrong - ik im on the free tier and not on the paid on so i wont be favoured but why this ? i dont wana come to any conclusions just yet - so im here asking for support...
No description
xenial-black
xenial-black12/15/2024

Update extension `pg_hashids` from 1.2.1 to 1.3.0

Would it be possible to upgrade the pg_hashids extension? It's fully backwards compatible, with the added benefit that all the functions are marked as IMMUTABLE and therefore can be used with GENERATED column statements.
fair-rose
fair-rose12/13/2024

Lua/pgmoon connection issues with Neon PostgreSQL endpoint ID configuration

Description: I'm trying to connect to a Neon PostgreSQL database from a Lua application using pgmoon. Im: * Attempting to establish a connection to Neon PostgreSQL from Lua using pgmoon library * Running on Replit with PostgreSQL 15 ...
provincial-silver
provincial-silver12/12/2024

CU-cluster per Branch / Non-Shared CU-cluster

Hi there, I am currently digging into the documentation and pricing model and was initially a bit surprised that a CU cluster can only serve a single branch at a time. Does this mean that the 300 hours of compute can be quickly consumed with production + multiple additional branches? Or is this not an issue in reality as its compensated by having 0.25 CU units and fast stop/resume times in NEON? I would expect that having shared CU clusters would avoid some overhead? ...
other-emerald
other-emerald12/12/2024

What are the tools you're using to write units tests for RLS?

What are the tools you're using to write units tests for RLS?
stormy-gold
stormy-gold12/11/2024

I have an issue with Table View on https://console.neon.tech.

When I click on a Tables and on the View always the first "normal" table is displayed. From my app the view is still accessible. Does any one also have issues displaying a table view in neon web console?...
No description
rising-crimson
rising-crimson12/11/2024

isn't `neonctl auth` requested permissions too aggressive?

I'm trying to setup neonctl in my dev env. But looks too aggressive. This might make me change my mind of using neon.
No description
itchy-amethyst
itchy-amethyst12/11/2024

Help on Applying Schema Changes from Branch to Main in Neon DB

Hi, I’m working on a project and was using the main branch in Neon DB. However, I needed to make some major schema changes, so I created a new branch and worked on those changes there. After completing the schema updates and generating the migration files locally, I want to apply all the changes from the new branch to the main branch. Could you please guide me on how to do this? Thank you!
xenial-black
xenial-black12/10/2024

Neon Authorize RLS with custom auth

As far as I understand, i just have to have a JWK endpoint to validate the tokens against and supply that in the Neon dashboard. Then when I set the token on the neon instance it will validate that token on the JWK endpoint i supply. So I could self host the JWK endpoint using Jose or a similar library? ...
metropolitan-bronze
metropolitan-bronze12/10/2024

Use pg_rrule extension

Is there the possibility to install pg_rrule extension for postgress? I need to work with iCalendar RRules and this extension makes it much easyer...
evident-indigo
evident-indigo12/10/2024

Read replica/primary limits

- Based on this image, it looks like replica using same compute (resources) with primary. So for eaxample on Scale plan it still will be in sum maximum 8CU (for example 4CU primary + 4CU read replica or 6CU primary 2CU read replica, so it can be 8CU for primary and 8CU for read replica) right? - Max connection on 8CU will be 3604 in sum (primary + all read replicas) right? - Is there any replica lag? thank you...
No description