Why is writing JSONB faster than just JSON?

2021-04-13 Thread Mitar
Hi! I have a project where we among other data want to store static JSON objects which can get pretty large (10-100 KB). I was trying to evaluate how it would work if we simply store it as an additional column in a PostgreSQL database. So I made a benchmark [1]. The results surprised me a bit and

RE: [Extern] Re: Advice on binary installation

2021-04-13 Thread Kevin Brannen
-Original Message- From: Zwettler Markus (OIZ) Sent: Tuesday, April 13, 2021 8:08 AM > -Ursprüngliche Nachricht- > Von: Paul Förster mailto:paul.foers...@gmail.com>> > Gesendet: Dienstag, 13. April 2021 15:02 > Betreff: [Extern] Re: Advice on binary installation > > Hi Marku

RE: Ways to "serialize" result set for later use?

2021-04-13 Thread Kevin Brannen
From: Adam Brusselback Sent: Monday, April 12, 2021 12:51 PM > Checking data (DML), if functions are doing the right things is something we > do in our code unit tests. This is exactly what I am writing, unit tests for my code (which is pl/pgsql). This is an ELT pipeline for my customers to b

Suboptimal plan when IN(...), ORDER BY and LIMIT are used (no JOINs)

2021-04-13 Thread Dmitry Koterov
Hi. I'm trying to understand the logic which the planner uses in "WHERE x IN (IDS) ORDER BY y LIMIT N" queries when the correct index exists in the database. I expected that, if IDS list is small and N is small too, the planner should've done the following: for each element in IDS, query first N

RE: looking for a installation package to Using GSSAPI with Postgres12 for windows

2021-04-13 Thread LE MENTEC, SANDRINE
Hello Jehan-Guillaume, Thanks a lot for your answer. It looks simplier to use SSPI (witch is already includes). I have try your suggestion and it seems to work. I need to try some value of the differents parameters to make my test fully work (include_realm, compat_realm, upn_username and krb_r

Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup

2021-04-13 Thread Laurenz Albe
On Tue, 2021-04-13 at 06:36 -0700, MaXinjian wrote: > > Why do you write the WAL to /tmp/pg_wal, only to later mount that at the > > default location? > > pg_wal dir has size limitation, if wal files are too large, they will be > overwrited, right? No, they won't. You could run out of space on the

Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup

2021-04-13 Thread Tom Lane
Ma Xinjian writes: > When I use pg_basebackup to backup and restore db(Let's call it A) to a > standalone instance(Let's call it B), "missing chunk number 0 for toast > value xxx in pg_toast_xxx" errors output. > PG version: 10.3 10.3 is quite a few bug fixes ago. Maybe you'd have better results

Re: looking for a installation package to Using GSSAPI with Postgres12 for windows

2021-04-13 Thread Jehan-Guillaume de Rorthais
Hello, On Tue, 13 Apr 2021 08:10:06 + "LE MENTEC, SANDRINE" wrote: > Dear postgres community, > > I am currently working on Postgres 12.5 on a windows server 2016. I need to > use Kerberos token for the authentication on the database. > > To do so, I am looking for an installation executab

Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup

2021-04-13 Thread MaXinjian
> Why do you write the WAL to /tmp/pg_wal, only to later mount that at the > default location? pg_wal dir has size limitation, if wal files are too large, they will be overwrited, right? > I see nothing wrong with what you are doing, but I may have got lost in > your complicated procedure. > You

AW: [Extern] Re: Advice on binary installation

2021-04-13 Thread Zwettler Markus (OIZ)
> -Ursprüngliche Nachricht- > Von: Paul Förster > Gesendet: Dienstag, 13. April 2021 15:02 > An: Zwettler Markus (OIZ) > Cc: pgsql-gene...@postgresql.org > Betreff: [Extern] Re: Advice on binary installation > > Hi Markus, > > On 13. Apr, 2021, at 14:43, Zwettler Markus (OIZ) > wrote:

Re: Advice on binary installation

2021-04-13 Thread Paul Förster
Hi Markus, On 13. Apr, 2021, at 14:43, Zwettler Markus (OIZ) wrote: > We assume to get more than 100 Postgres clusters in the future. > > We will get a very heterogeneous binary installation basis if we install > needed extensions (e.g. ip4r) or software (e.g. patroni) on a per project > bas

Advice on binary installation

2021-04-13 Thread Zwettler Markus (OIZ)
Hi, We assume to get more than 100 Postgres clusters in the future. We will get a very heterogeneous binary installation basis if we install needed extensions (e.g. ip4r) or software (e.g. patroni) on a per project basis. There could be even more incompatibility problems otherwise if we install

Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup

2021-04-13 Thread Laurenz Albe
On Tue, 2021-04-13 at 02:38 -0700, Ma Xinjian wrote: > When I use pg_basebackup to backup and restore db(Let's call it A) to a > standalone instance(Let's call it B), "missing chunk number 0 for toast > value xxx in pg_toast_xxx" errors output. > > PG version: 10.3 > pg_basebackup command: >

Re: rollback previous commit if the current one fails

2021-04-13 Thread pinker
thank you Luis, but this is not supported in plpgsql -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Re: rollback previous commit if the current one fails

2021-04-13 Thread luis . roberto
- Mensagem original - > Any idea how to approach it? Hi! https://www.postgresql.org/docs/current/sql-savepoint.html Luis R. Weck

"missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup

2021-04-13 Thread Ma Xinjian
Hi, When I use pg_basebackup to backup and restore db(Let's call it A) to a standalone instance(Let's call it B), "missing chunk number 0 for toast value xxx in pg_toast_xxx" errors output. PG version: 10.3 pg_basebackup command: /usr/pgsql-10/bin/pg_basebackup -h p-rdb-c01 -D /var/lib/pgsql

looking for a installation package to Using GSSAPI with Postgres12 for windows

2021-04-13 Thread LE MENTEC, SANDRINE
Dear postgres community, I am currently working on Postgres 12.5 on a windows server 2016. I need to use Kerberos token for the authentication on the database. To do so, I am looking for an installation executable file for windows with the GSSAPI included. The basic one provided by EDB does not

rollback previous commit if the current one fails

2021-04-13 Thread pinker
Hi, i need to emulate oracle's savepoint behaviour inside of the plpgsql function. This function is able to insert all the rows that weren't caught on the exception, but i need also to rollback the insert that happens before the exception. So let's say the exception is thrown when j=3 so i need a