Re: [HACKERS] kqueue

2019-12-19 Thread Rui DeSousa
> On Apr 10, 2018, at 9:05 PM, Thomas Munro > wrote: > > On Wed, Dec 6, 2017 at 12:53 AM, Thomas Munro > wrote: >> On Thu, Jun 22, 2017 at 7:19 PM, Thomas Munro >> wrote: >>> I don't plan to resubmit this patch myself, but I was doing some >>> spring cleaning and rebasing today and I figured

Re: [HACKERS] kqueue

2020-01-17 Thread Rui DeSousa
Thanks Thomas, Just a quick update. I just deployed this patch into a lower environment yesterday running FreeBSD 12.1 and PostgreSQL 11.6. I see a significant reduction is CPU/system load from load highs of 500+ down to the low 20’s. System CPU time has been reduced to practically nothing.

archive_command

2018-03-07 Thread Rui DeSousa
Hi, I’ve been encouraged to submit this code as there has been talk in the past about a simple pgcopy command to use with the archive_command. Currently there is really no good solution in most base systems without having to introduce a dedicated third party Postgres solution. The best base

Re: Possible optimisation: push down SORT and LIMIT nodes

2018-06-01 Thread Rui DeSousa
In the meantime you can force it with CTE. with inv as ( select id_asset , inventory.date , quantity from inventory order by inventory.date limit 100 ) select inv.date, asset.name, inv.quantity from inv join asset on id_asset = asset.id order by inv.date, asset.name ; > On Jun 1,

Re: Possible optimisation: push down SORT and LIMIT nodes

2018-06-01 Thread Rui DeSousa
all involved in doing that. Thank > you for making Postgres even more awesome! > > Thanks, Chris. > > Sent from my iPhone > > On 1 Jun 2018, at 16:44, Rui DeSousa <mailto:rui.deso...@icloud.com>> wrote: > >> In the meantime you can force it with CTE. >&

Re: Remove mention in docs that foreign keys on partitioned tables are not supported

2018-06-14 Thread Rui DeSousa
> On Jun 14, 2018, at 9:19 AM, Robert Haas wrote: > > anyone who wants a BEFORE trigger has a good reason > for wanting it. I have used before triggers to enforce the immutability of a column. i.e. if (new.member_key != old.member_key) then raise exception 'Unable to change member_ke

Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query

2018-06-22 Thread Rui DeSousa
Why not just parameterize it with the three key fields; userid, dbid, and queryid? i.e It would then allow it be limited to only records associated with a given user and/or database as well. pg_stat_statements_reset(dbid oid, userid oid, queryid bigint) pg_stat_statements_reset(null, null, 356

Re: automatic restore point

2018-06-25 Thread Rui DeSousa
Why not use auto commit off in the session or .psqlrc file or begin and then use rollback? \set AUTOCOMMIT off What would be nice is if a syntax error didn’t abort the transaction when auto commit is off — being a bad typist.

Re: automatic restore point

2018-06-25 Thread Rui DeSousa
> On Jun 26, 2018, at 12:37 AM, Justin Pryzby wrote: > > I think you'll get that behavior with ON_ERROR_ROLLBACK. > Awesome. Thanks!