Re: Information on savepoint requirement within transctions

2018-01-30 Thread Rakesh Kumar
> > I'm not sure about the terminology here, though, because the Transaction > Tutorial > (https://www.postgresql.org/docs/9.6/static/tutorial-transactions.html) > speaks of "aborted" transactions, while you use the term "failed" here. Purely from a user point of view, shouldn't "aborted" mean

Re: session_replication_role meaning?

2018-01-30 Thread Jan Wieck
On Tue, Jan 30, 2018 at 3:36 AM, Laurenz Albe wrote: > Luca Ferrari wrote: > > now this should be trivial, but I cannot udnerstand what is the > > purpose of session_replication_role > > or better, when I should use it in a way different from 'origin'. > > It is used to

Re: Information on savepoint requirement within transctions

2018-01-30 Thread David G. Johnston
On Tue, Jan 30, 2018 at 8:25 AM, Rakesh Kumar wrote: > > > > I'm not sure about the terminology here, though, because the Transaction > > Tutorial (https://www.postgresql.org/docs/9.6/static/tutorial- > transactions.html) > > speaks of "aborted" transactions, while you

Re: Alter view with dependence without drop view!

2018-01-30 Thread bto...@computer.org
One way I have approached this problem is: 1) Use PgAdmin attempt the change. 2) Examine the error report PgAdmin displays that identifies which dependent views are preventing your progress. 3) Wrap your original DDL from step 1 within the DROP and CREATE DDL associated with the closest

ERROR: invalid memory alloc request size 1073741824

2018-01-30 Thread Stefan Blanke
Hello, We've tripped over an error when doing a "COPY.. TO STDOUT WITH BINARY" query. "ERROR: invalid memory alloc request size 1073741824" (exactly 1GB) So a palloc() call is failing on the AllocSizeIsValid() check. Does anyone know if this a safety catch we are tripping with a bad query

Re: Alter view with dependence without drop view!

2018-01-30 Thread David G. Johnston
On Tue, Jan 30, 2018 at 8:34 AM, bto...@computer.org wrote: > > When this procedure got old, I started using a script created using > pg_dump and pg_restore, as initially outlined here: > > ​Yeah, the short answer is PostgreSQL doesn't make it possible to edit "middle"

Re: Alter view with dependence without drop view!

2018-01-30 Thread Melvin Davidson
On Tue, Jan 30, 2018 at 12:48 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Tue, Jan 30, 2018 at 8:34 AM, bto...@computer.org < > bto...@broadstripe.net> wrote: > >> >> When this procedure got old, I started using a script created using >> pg_dump and pg_restore, as initially

Many Backends stuck in wait event IPC/ParallelFinish

2018-01-30 Thread Steven Winfield
Hi, We just had an incident on one of our non-production databases where 14 unrelated queries were all hung in wait event IPC / ParallelFinish. We had systematically called pg_cancel/terminate_backend on all other backends except these (and the autovacuum process mentioned below) to make sure

Re: Alter view with dependence without drop view!

2018-01-30 Thread Thomas Kellerer
Elson Vaz schrieb am 30.01.2018 um 14:40: Hello! I want make change in one view that have dependence view's, so when i try to make change i'm block because of this, what is the best solution?? This can easily be dealt with when using a schema management tool. We use Liquibase for this and

Re: ERROR: invalid memory alloc request size 1073741824

2018-01-30 Thread Jan Wieck
On Tue, Jan 30, 2018 at 12:35 PM, Stefan Blanke < stefan.bla...@framestore.com> wrote: > Hello, > > We've tripped over an error when doing a "COPY.. TO STDOUT WITH BINARY" > query. > > "ERROR: invalid memory alloc request size 1073741824" > (exactly 1GB) > I have my money on a corrupted TOAST

Re: How to Optimize pg_trgm Performance

2018-01-30 Thread Ivan E. Panchenko
Hi Igal, 29.01.2018 02:42, Igal @ Lucee.org пишет: I want to use pg_trgm for auto-suggest functionality.  I created a Materialized View with the information that I need, with the relevant columns being (keywords text, rank int). keywords is the column from which I build the tri-grams, and

Working with JSONB data having node lists

2018-01-30 Thread geoff hoffman
JSONB fields are very attractive for our current use, particularly as straight key-value pairs in the JSONB data; but we are having trouble finding documentation on how to query lists (of scalars or objects) in nodes of the JSONB data. ~~~ I have the table as follows: CREATE TABLE

Re: session_replication_role meaning?

2018-01-30 Thread Achilleas Mantzios
On 30/01/2018 09:48, Luca Ferrari wrote: Hi all, now this should be trivial, but I cannot udnerstand what is the purpose of session_replication_role or better, when I should use it in a way

Re: session_replication_role meaning?

2018-01-30 Thread Laurenz Albe
Luca Ferrari wrote: > now this should be trivial, but I cannot udnerstand what is the > purpose of session_replication_role > or better, when I should use it in a way different from 'origin'. It is used to enable or disable triggers. By default, tables are created with all triggers enabled,

Re: Information on savepoint requirement within transctions

2018-01-30 Thread Robert Zenz
On 30.01.2018 03:07, David G. Johnston wrote: > ​So, my first pass at this. Nice, thank you. > + These are of particular use for client software to use when executing > + user-supplied SQL statements and want to provide try/catch behavior > + where failures are ignored. Personally, I'd

Re: PG Sharding

2018-01-30 Thread Rakesh Kumar
>We are looking for multi tenancy but at scale. That's why the sharding and >partitioning. It depends how you look at the distributed part. Citusdb.