Re: [HACKERS] RustgreSQL

2017-01-08 Thread Craig Ringer
On 8 Jan. 2017 18:14, "Fabien COELHO" wrote: Is this completely unrealistic or is it carved in stone PostgreSQL will >> always be a C project forever and ever? >> > > From my very limited understanding, PostgreSQL is more likely to be > converted to C++! > ISTM that

Re: [HACKERS] RustgreSQL

2017-01-08 Thread Craig Ringer
On 8 Jan. 2017 17:10, "Joel Jacobson" wrote: Is this completely unrealistic or is it carved in stone PostgreSQL will always be a C project forever and ever? Incredibly unrealistic. PostgreSQL makes heavy use of variable length arrays. longjmp() is critical to its error

Re: [HACKERS] logical decoding of two-phase transactions

2017-01-05 Thread Craig Ringer
ARE TRANSACTION? If we can't find the prepared transaction in TwoPhaseState we know to expect a following ROLLBACK PREPARED or COMMIT PREPARED, so we shouldn't decode it at the PREPARE TRANSACTION stage. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Developmen

Re: [HACKERS] proposal: session server side variables

2017-01-05 Thread Craig Ringer
iting the >>config file does that already, by the way?) We have that, but it currently requires a C extension. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgs

Re: [HACKERS] Logical decoding on standby

2017-01-05 Thread Craig Ringer
On 5 January 2017 at 13:12, Michael Paquier <michael.paqu...@gmail.com> wrote: > On Thu, Jan 5, 2017 at 10:21 AM, Craig Ringer <cr...@2ndquadrant.com> wrote: >> On 5 January 2017 at 09:19, Craig Ringer <cr...@2ndquadrant.com> wrote: >> >>> so here's a

Re: [HACKERS] Logical decoding on standby

2017-01-04 Thread Craig Ringer
On 4 January 2017 at 16:19, Craig Ringer <cr...@2ndquadrant.com> wrote: > On 4 January 2017 at 12:15, Craig Ringer <cr...@2ndquadrant.com> wrote: > >> That's particularly relevant to you Simon as you expressed a wish to >> commit the new streaming rep tests.

Re: [HACKERS] proposal: session server side variables

2017-01-04 Thread Craig Ringer
On 5 January 2017 at 08:35, Craig Ringer <cr...@2ndquadrant.com> wrote: > On 5 January 2017 at 01:49, Fabien COELHO <coe...@cri.ensmp.fr> wrote: >> >>> ok understand >> >> >> Good. So we seem to agree that GUCS are transactional? > > No. We d

Re: [HACKERS] proposal: session server side variables

2017-01-04 Thread Craig Ringer
of SET SESSION are never reverted, whether you commit or roll back. craig=> SET x.s = 'x'; SET craig=> BEGIN; BEGIN craig=> SET LOCAL x.s = 'y'; SET craig=> COMMIT; COMMIT craig=> SHOW x.s; x.s - x (1 row) There are simply different scopes, one of which is the transaction scope. -

Re: [HACKERS] Replication slot xmin is not reset if HS feedback is turned off while standby is shut down

2017-01-04 Thread Craig Ringer
On 2 January 2017 at 22:24, Craig Ringer <cr...@2ndquadrant.com> wrote: > > > On 2 Jan. 2017 20:20, "Simon Riggs" <si...@2ndquadrant.com> wrote: > > On 21 December 2016 at 13:23, Simon Riggs <si...@2ndquadrant.com> wrote: > >> Fix it up and

Re: [HACKERS] proposal: session server side variables

2017-01-04 Thread Craig Ringer
On 4 Jan. 2017 19:03, "Fabien COELHO" wrote: >>> I respect your opinion and don't agree with it. >> >> >> Yeah. I'm pretty overwhelmingly unconvinced too. > > I'm lost. > > The security-related use-case you have presented stores the status of the > verification in a

Re: [HACKERS] pg_recvlogical --endpos

2017-01-04 Thread Craig Ringer
ostgresql.org/message-id/CAMsr+YEzC=-+eV09A=ra150fjtkmtqt5q70piqbwytbor3c...@mail.gmail.com If this is committed, the remaining decoding on standby patches will just be the meat of the feature. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Traini

Re: [HACKERS] proposal: session server side variables

2017-01-04 Thread Craig Ringer
ment is a pain. > > I respect your opinion and don't agree with it. Yeah. I'm pretty overwhelmingly unconvinced too. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hac

Re: [HACKERS] Logical decoding on standby

2017-01-04 Thread Craig Ringer
On 4 January 2017 at 12:15, Craig Ringer <cr...@2ndquadrant.com> wrote: > That's particularly relevant to you Simon as you expressed a wish to > commit the new streaming rep tests. Patches 0001 and 0005 in this series also posted as https://www.postgresql.org/mess

Re: [HACKERS] [PATCH] PostgresNode.pm enhancements, pg_lsn helper, and some more recovery tests

2017-01-04 Thread Craig Ringer
On 4 January 2017 at 12:39, Craig Ringer <cr...@2ndquadrant.com> wrote: > To keep things together, I've followed up on the logical decoding on > standby thread that now incorporates all these patches. Attached are the two patches discussed upthread, in their proposed-for

Re: [HACKERS] [PATCH] PostgresNode.pm enhancements, pg_lsn helper, and some more recovery tests

2017-01-03 Thread Craig Ringer
On 3 January 2017 at 12:36, Craig Ringer <cr...@2ndquadrant.com> wrote: > On 2 January 2017 at 20:17, Simon Riggs <si...@2ndquadrant.com> wrote: > >> Bit confused... can't see a caller for wait_for_slot_catchup() and the >> slot tests don't call it AFAICS. >

Re: [HACKERS] Logical decoding on standby

2017-01-03 Thread Craig Ringer
On 4 January 2017 at 12:08, Craig Ringer <cr...@2ndquadrant.com> wrote: > > 0001 incorporates the changes requested by Michael Paquier. Simon > expressed his intention to commit this after updates, in the separate > thread [...] ... > 0005 (new streaming rep tests) is up

Re: [HACKERS] Logical decoding - filtering tables

2017-01-03 Thread Craig Ringer
On 3 January 2017 at 21:32, valeriof <valerio_farrug...@hotmail.com> wrote: > Craig Ringer-3 wrote >> Take a look at how pglogical does it in its replication set handling >> and relation metadata cache. > > I checked it out but for what I understand it uses the inli

Re: [HACKERS] Shrink volume of default make output

2017-01-03 Thread Craig Ringer
lot. Personally I'd rather let it lie, use 'make -s' and wait for cmake. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes t

Re: [HACKERS] Logical decoding - filtering tables

2017-01-03 Thread Craig Ringer
and relation metadata cache. I would quite like to generalise this approach, but am currently more focused on things that cannot already be done without core changes. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -

Re: [HACKERS] [PATCH] PostgresNode.pm enhancements, pg_lsn helper, and some more recovery tests

2017-01-02 Thread Craig Ringer
PostgresNode.pm and new standby tests that'd be very handy. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Replication slot xmin is not reset if HS feedback is turned off while standby is shut down

2017-01-02 Thread Craig Ringer
On 2 Jan. 2017 20:20, "Simon Riggs" wrote: On 21 December 2016 at 13:23, Simon Riggs wrote: > Fix it up and I'll commit. Thanks for the report. I was hoping for some more effort from Ants to correct this. I'll commit Craig's new tests for hs

Re: [HACKERS] proposal: session server side variables

2017-01-01 Thread Craig Ringer
On 1 Jan. 2017 20:03, "Fabien COELHO" wrote: What if setup_user() succeeds as a function but the transaction it belongs to fails for some reason (eg deferred constraints, other operation related to setting user up but outside of this function fails, there is replication

Re: [HACKERS] proposal: session server side variables

2016-12-30 Thread Craig Ringer
peated sub-queries or to retype non trivial values. > > Client side psql :-variables are untyped and unescaped, thus not very > convenient for this purpose. You can currently (ab)use user defined GUCs for this. Ugly, but effective, and honestly something we could bless into general use i

Re: [HACKERS] Add doc advice about systemd RemoveIPC

2016-12-30 Thread Craig Ringer
ser accounts. "If you have installed postgres from distribution or postgresql.org-provided packages and use the scripts or commands provided by the packages to start and stop PostgreSQL, this issue is unlikely to affect you." ? -- Craig Ringer http://www.2ndQua

Re: [HACKERS] proposal: session server side variables

2016-12-30 Thread Craig Ringer
On 30 December 2016 at 17:29, Craig Ringer <cr...@2ndquadrant.com> wrote: > So lets take a step back or eight and ask "why?" Oh, and speaking of, I see Pavel's approach as looking for a PostgreSQL-adapted way to do something like Oracle's PL/SQL package variables.

Re: [HACKERS] proposal: session server side variables

2016-12-30 Thread Craig Ringer
* Does anyone care about or want variables whose value is persistent on-disk across restarts and/or crashes, maybe recorded in WAL for replication, etc? If so, justify how this is better than a relation in real-world practical terms. -- Craig Ringer http://www.2ndQuad

Re: [HACKERS] proposal: session server side variables

2016-12-30 Thread Craig Ringer
You expect different things from variables, to the point where it's a different feature. It's unlikely two unrelated variable implementations will be accepted. I think progress can only be achieved by setting out requirements, a feature matrix, and which proposed implementations can deliv

Re: [HACKERS] BUG: pg_stat_statements query normalization issues with combined queries

2016-12-29 Thread Craig Ringer
edding the NodeTag too and creating a common UtilityStmt. The latter probably has benefits for later extension, but is a bit more annoying in the shorter term. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: [HACKERS] [PATCH] Fix minor race in commit_ts SLRU truncation vs lookups

2016-12-29 Thread Craig Ringer
On 29 December 2016 at 16:51, Craig Ringer <cr...@2ndquadrant.com> wrote: > On 28 December 2016 at 22:16, Petr Jelinek <petr.jeli...@2ndquadrant.com> > wrote: > >> About the patch, it looks good to me for master with the minor exception >> that: >>> +

Re: [HACKERS] [PATCH] Fix minor race in commit_ts SLRU truncation vs lookups

2016-12-29 Thread Craig Ringer
trunc.oldestXid); > > This should probably say oldestXid instead of xid in the text description. Agreed. > About back-patching, I wonder if standby could be modified to move > oldestXid based on pageno reverse calculation, but it's going to be > slightly ugly. Not worth it IMO

Re: [HACKERS] proposal: session server side variables

2016-12-28 Thread Craig Ringer
OR That's the general idea. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] [PATCH] Fix minor race in commit_ts SLRU truncation vs lookups

2016-12-28 Thread Craig Ringer
while looking into that.) -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services From 361a92ecbe45226ed25ce87da6a8c7bd749cca4a Mon Sep 17 00:00:00 2001 From: Craig Ringer <cr...@2ndquadrant.com> Date: Wed, 28 Dec 2016 21:2

Re: [HACKERS] proposal: session server side variables

2016-12-28 Thread Craig Ringer
ly special ones with > permissions. Since, unlike Oracle, we don't have compiled packages or plan-caching above the session level, there's not the same hard requirement for the variable definition to be persistent. So... maybe? The main question then becomes how you integrate access control.

Re: [HACKERS] [PATCH] Transaction traceability - txid_status(bigint)

2016-12-28 Thread Craig Ringer
On 23 December 2016 at 18:00, Craig Ringer <cr...@2ndquadrant.com> wrote: > I'll have to follow up with a patch soon, as it's Toddler o'Clock. Here we go. This patch advances oldestXid, under XidGenLock, _before_ truncating clog. txid_status() holds XidGenLock from when it tests

Re: [HACKERS] Faster methods for getting SPI results

2016-12-28 Thread Craig Ringer
On 28 December 2016 at 12:32, Jim Nasby <jim.na...@bluetreble.com> wrote: > On 12/27/16 9:10 PM, Craig Ringer wrote: >> >> On 28 December 2016 at 09:58, Jim Nasby <jim.na...@bluetreble.com> wrote: >> >>> I've looked at this some more, and ITSM that th

Re: [HACKERS] Hooks

2016-12-27 Thread Craig Ringer
th it. Lets just make sure the comment blocks are nice and grep-able too. I think this is a great idea FWIW. Discovering the extension points within Pg isn't easy. Callbacks aren't easy to find either. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 S

Re: [HACKERS] proposal: session server side variables

2016-12-27 Thread Craig Ringer
rate topic to this and should be dealt with in a separate thread if/when someone wants to work on them. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresq

Re: [HACKERS] Some thoughts about multi-server sync rep configurations

2016-12-27 Thread Craig Ringer
xact masking used by sync rep at the moment. I suspect that solving that is probably tied to solving it on standbys. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing lis

Re: [HACKERS] BUG: pg_stat_statements query normalization issues with combined queries

2016-12-27 Thread Craig Ringer
ecting position tracking info sorted out yet. The information will need to be copied to plans later, but that's easy, and would've been necessary anyway. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --

Re: [HACKERS] Faster methods for getting SPI results

2016-12-27 Thread Craig Ringer
rary C function for each tuple > to be sent. That sounds a lot more sensible than the prior proposals. Callback driven. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-

Re: [HACKERS] BUG: pg_stat_statements query normalization issues with combined queries

2016-12-26 Thread Craig Ringer
On 23 Dec. 2016 17:53, "Fabien COELHO" wrote: Yes. I'll try to put together a patch and submit it to the next CF. > Here it is. I'll add this to the next CF. Great. Please put me (ringerc) down as a reviewer. I'll get to this as soon as holidays settle down. It'd be very

Re: [HACKERS] BUG: pg_stat_statements query normalization issues with combined queries

2016-12-26 Thread Craig Ringer
On 21 Dec. 2016 11:44, "Robert Haas" wrote: On Tue, Dec 20, 2016 at 6:18 AM, Fabien COELHO wrote: > Would this approach be acceptable, or is modifying Nodes a no-go area? > > If it is acceptable, I can probably put together a patch and submit it. > >

Re: [HACKERS] Cluster wide option to control symbol case folding

2016-12-25 Thread Craig Ringer
On 25 Dec. 2016 14:49, "Tom Lane" wrote: No. This has been looked into repeatedly in the past, and we simply don't want to deal with it. Quite aside from the impact on the server (which would be extensive), it would break every nontrivial application, and force them all

Re: [HACKERS] Cluster wide option to control symbol case folding

2016-12-24 Thread Craig Ringer
On 25 Dec. 2016 10:30 am, "Lewis, Ian (Microstar Laboratories)" < ile...@mstarlabs.com> wrote: Is there any chance that the PostgreSQL developers would accept a new cluster wide configuration option to control how the system handles symbol case folding? Probably not as a GUC (configuration

Re: [HACKERS] Logical decoding on standby

2016-12-23 Thread Craig Ringer
On 22 December 2016 at 14:21, Craig Ringer <cr...@2ndquadrant.com> wrote: changes-in-0001-v2.diff shows the changes to PostgresNode.pm per Michael's comments, and applies on top of 0001. I also attach a patch to add a new CREATE_REPLICATION_SLOT option per Petr's suggestion, so you can r

Re: [HACKERS] [PATCH] Transaction traceability - txid_status(bigint)

2016-12-23 Thread Craig Ringer
ical decoding on standby has parallels to this, for example, though not enough to create useful overlap of functionality.) -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (

Re: [HACKERS] Logical decoding on standby

2016-12-21 Thread Craig Ringer
from PostgresNode::psql in the mean time; not so much so with pg_recvlogical. > And finally 0006. > +$node_standby_1->append_conf('recovery.conf', "primary_slot_name = > $slotname_1\n"); > +$node_standby_1->append_conf('postgresql.conf', > "wal_receiver_status_in

Re: [HACKERS] [PATCH] Transaction traceability - txid_status(bigint)

2016-12-21 Thread Craig Ringer
On 22 December 2016 at 09:55, Craig Ringer <cr...@2ndquadrant.com> wrote: > Updated. > > If you think it's better to just take XidGenLock again, let me know. Here's a further update that merges in Robert's changes from the patch posted upthread. -- Craig Ringer

Re: [HACKERS] [PATCH] Transaction traceability - txid_status(bigint)

2016-12-21 Thread Craig Ringer
On 22 December 2016 at 07:49, Craig Ringer <cr...@2ndquadrant.com> wrote: > On 22 December 2016 at 00:30, Robert Haas <robertmh...@gmail.com> wrote: > >> That makes everything that happens between when we acquire that lock >> and when we release it non-interruptibl

Re: [HACKERS] [PATCH] Transaction traceability - txid_status(bigint)

2016-12-21 Thread Craig Ringer
so I think it's probably better to add a new LWLock, and I'll resubmit on that basis, but figure it's worth asking. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hac

Re: [HACKERS] Replication slot xmin is not reset if HS feedback is turned off while standby is shut down

2016-12-21 Thread Craig Ringer
rgot to add you to the direct Cc list. It passes the provided test script. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Replication slot xmin is not reset if HS feedback is turned off while standby is shut down

2016-12-21 Thread Craig Ringer
can be true before HotStandbyActive() is true. Here's a revised version. I haven't run it against your tests yet. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services From 5d86d42e30ccb3dd3e1b227b102384762d66e9dd Mon Sep 17 00:

Re: [HACKERS] Replication slot xmin is not reset if HS feedback is turned off while standby is shut down

2016-12-21 Thread Craig Ringer
ication slots until later in startup, but that's a pre-existing flaw that should be addressed separately. Why do we need to do more than master_has_standby_xmin = true ? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Service

Re: [HACKERS] SET NOT NULL [NOT VALID / CONCURRENTLY]?

2016-12-21 Thread Craig Ringer
straints". Note that "[VALIDATE] acquires only a SHARE UPDATE EXCLUSIVE lock on the table being altered" so it's already suitable for what you need. The challenge is making it possible to create a NOT VALID constraint for NOT NULL. -- Craig Ringer http://www.2ndQuad

Re: [HACKERS] pg_background contrib module proposal

2016-12-21 Thread Craig Ringer
osoft.com/en-us/library/hh706895(v=vs.85).aspx . I'm not sure. On older systems sleeps are 1ms to 15ms. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql

Re: [HACKERS] SET NOT NULL [NOT VALID / CONCURRENTLY]?

2016-12-21 Thread Craig Ringer
other similar cases should all be handled the same way: create the constraint NOT VALID, then VALIDATE it while holding a weak lock that only blocks concurrent schema changes. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &

Re: [HACKERS] bigint vs txid user confusion

2016-12-21 Thread Craig Ringer
On 21 December 2016 at 14:06, Jim Nasby <jim.na...@bluetreble.com> wrote: > On 12/20/16 10:20 PM, Craig Ringer wrote: >> >> Tools look at pg_class.relfrozenxid and pg_databse.datfrozenxid more >> than probably anything else, so making changes that ignores them is >&g

Re: [HACKERS] [PATCH] Transaction traceability - txid_status(bigint)

2016-12-21 Thread Craig Ringer
On 27 September 2016 at 09:23, Craig Ringer <cr...@2ndquadrant.com> wrote: > On 21 September 2016 at 22:16, Robert Haas <robertmh...@gmail.com> wrote: >> >> It might not be too hard to add a second copy of oldestXid in shared >> memory that is updated before

Re: [HACKERS] bigint vs txid user confusion

2016-12-20 Thread Craig Ringer
On 17 December 2016 at 00:13, Robert Haas <robertmh...@gmail.com> wrote: > On Thu, Dec 15, 2016 at 3:02 AM, Craig Ringer <cr...@2ndquadrant.com> wrote: >> I really wish we could just change the pg_stat_activity and >> pg_stat_replication xid fields to be epoch

Re: [HACKERS] Logical decoding on standby

2016-12-20 Thread Craig Ringer
_("%s: --endpos may only be specified with --start\n"), so I won't post a separate followup patch. Okano Naoki tried to bring this to my attention earlier, but I didn't understand as I hadn't yet realised you could use --create-slot --start, they weren't mutually exclusive.

Re: [HACKERS] Logical decoding on standby

2016-12-20 Thread Craig Ringer
post patches on the same thread on separate CF entries. It's also confusing to post patches on a nest of inter-related threads to allow each thread to be tracked by a separate CF entry. At the moment I'm aiming to progressively get the underlying infrastructure/test stuff in so we can focus on the c

Re: [HACKERS] Replication slot xmin is not reset if HS feedback is turned off while standby is shut down

2016-12-20 Thread Craig Ringer
rself as author. I have set patch state to "waiting on author" pending your addressing these remarks. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-h

Re: [HACKERS] Protect syscache from bloating with negative cache entries

2016-12-20 Thread Craig Ringer
Otherwise that'll be no fun at all, especially with some of those lovely "we kept getting errors so we raised max_connections to 5000" systems out there. But also on more sensibly configured ones that're busy and want nice smooth performance without stalls. -- Craig Ringer

Re: [HACKERS] Logical replication existing data copy

2016-12-19 Thread Craig Ringer
On 20 Dec. 2016 1:27 am, "Peter Eisentraut" < peter.eisentr...@2ndquadrant.com> wrote: On 12/19/16 4:30 AM, Petr Jelinek wrote: > So existing table data can be copied once subscription is created, but > also new tables can be added and their data copied. This is where the > REFRESH PUBLICATION

Re: [HACKERS] delta relations in AFTER triggers

2016-12-17 Thread Craig Ringer
On 22 Nov. 2016 03:01, "Thomas Munro" wrote: How about a QueryEnvironment (as shown in the patch I posted) that contains a list of NamedTuplestore pointers (the SpiRelation struct in the patch I posted, renamed) and in future perhaps lists of other

Re: [HACKERS] delta relations in AFTER triggers

2016-12-17 Thread Craig Ringer
On 22 Nov. 2016 01:05, "Kevin Grittner" wrote: Right, I think we should assume that there will be other ways people want to use parts of what is done here, including building tuplestores through other means and referencing them in queries. Yes. PL/pgsql table-valued

Re: [HACKERS] jsonb problematic operators

2016-12-16 Thread Craig Ringer
On 16 December 2016 at 17:08, Matteo Beccati <p...@beccati.com> wrote: > Hi, > > On 12/12/2016 05:09, Craig Ringer wrote: >> Does PDO let you double question marks to escape them, writing ?? or >> \? instead of ? or anything like that? >> >> If not, I sugge

Re: [HACKERS] Logical Replication WIP

2016-12-15 Thread Craig Ringer
On 15 Dec. 2016 18:19, "Petr Jelinek" wrote: On 13/12/16 21:42, Peter Eisentraut wrote: > On 12/10/16 2:48 AM, Petr Jelinek wrote: >> Attached new version with your updates and rebased on top of the current >> HEAD (the partitioning patch produced quite a few

[HACKERS] bigint vs txid user confusion

2016-12-15 Thread Craig Ringer
ould just change the pg_stat_activity and pg_stat_replication xid fields to be epoch qualified in a 64-bit wide 'fullxid' type, or similar. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mail

Re: [HACKERS] pg_background contrib module proposal

2016-12-13 Thread Craig Ringer
On 13 Dec. 2016 20:54, "amul sul" wrote: postgres=> select * from pg_background_result(67069) as (x text); ERROR: terminating connection due to administrator command CONTEXT: background worker, pid 67069 postgres=> It'll also want to handle cancellation due to conflict

Re: [HACKERS] exposing wait events for non-backends (was: Tracking wait event for latches)

2016-12-12 Thread Craig Ringer
On 13 December 2016 at 09:13, Michael Paquier <michael.paqu...@gmail.com> wrote: > On Tue, Dec 13, 2016 at 10:05 AM, Craig Ringer <cr...@2ndquadrant.com> wrote: >> We should probably expose a proc_type or something, with types: >> >> * client_backend >> *

Re: [HACKERS] Password identifiers, protocol aging and SCRAM protocol

2016-12-12 Thread Craig Ringer
y, which has all the same benefits and security problems as allowing connect-time selection of authorization identity without such a framework. And we have SET ROLE. ERRORing is the right thing to do here, so we can safely use this protocol functionality later if we want to allow user masquer

Re: [HACKERS] background sessions

2016-12-12 Thread Craig Ringer
On 12 December 2016 at 23:29, Robert Haas <robertmh...@gmail.com> wrote: > On Mon, Dec 12, 2016 at 10:02 AM, Craig Ringer > <craig.rin...@2ndquadrant.com> wrote: >> On 12 Dec. 2016 21:55, "Robert Haas" <robertmh...@gmail.com> wrote: >> On Sun,

Re: [HACKERS] pg_background contrib module proposal

2016-12-12 Thread Craig Ringer
y-hit places and loops. Ensure the worker waits on latches rather than pg_usleep()ing. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] exposing wait events for non-backends (was: Tracking wait event for latches)

2016-12-12 Thread Craig Ringer
I/O channels, as well as other auxillary processes. We should probably expose a proc_type or something, with types: * client_backend * bgworker * walsender * autovacuum * checkpointer * bgwriter for simpler filtering. I don't think existing user code is likely to get upset by more processes appeari

Re: [HACKERS] background sessions

2016-12-12 Thread Craig Ringer
On 12 Dec. 2016 21:55, "Robert Haas" wrote: On Sun, Dec 11, 2016 at 5:38 AM, Andrew Borodin wrote: > 1. As far as I can see, we connot use COPY FROM STDIN in bg session? > Since one of purposes is to orchestrate transactions, may be that > would be

Re: [HACKERS] jsonb problematic operators

2016-12-12 Thread Craig Ringer
On 12 Dec. 2016 22:22, "Merlin Moncure" wrote: If we really wanted to fix this, maybe the right way to think about the problem is a highly reduced character set and a pre-processor or an extension. I'm pretty OK with expecting client drivers not to be stupid and offer

Re: [HACKERS] jsonb problematic operators

2016-12-11 Thread Craig Ringer
On 12 December 2016 at 12:52, Tom Lane <t...@sss.pgh.pa.us> wrote: > Craig Ringer <cr...@2ndquadrant.com> writes: >> It's definitely annoying, in both directions. ? wasn't a great choice >> for an operator character but it's logical and was grandf

Re: [HACKERS] jsonb problematic operators

2016-12-11 Thread Craig Ringer
PDO let you double question marks to escape them, writing ?? or \? instead of ? or anything like that? If not, I suggest that you (a) submit a postgres patch adding alternative operator names for ? and ?|, and (b) submit a PDO patch to allow ?? or \? as an escape for ? . -- Craig Ringer

Re: [HACKERS] snapbuild woes

2016-12-11 Thread Craig Ringer
On 12 December 2016 at 00:36, Kevin Grittner <kgri...@gmail.com> wrote: > On Sun, Dec 11, 2016 at 1:17 AM, Craig Ringer > <craig.rin...@2ndquadrant.com> wrote: >> On 11 Dec. 2016 06:50, "Petr Jelinek" <petr.jeli...@2ndquadrant.com> wrote: &

Re: [HACKERS] snapbuild woes

2016-12-10 Thread Craig Ringer
On 11 Dec. 2016 06:50, "Petr Jelinek" wrote: On 10/12/16 23:10, Petr Jelinek wrote: > > The attached 0002-Skip-unnecessary-snapshot-builds.patch changes this > behavior so that we don't make snapshots for transactions that we seen > wholly and know that they didn't

Re: [HACKERS] Back-patch use of unnamed POSIX semaphores for Linux?

2016-12-10 Thread Craig Ringer
On 11 Dec. 2016 07:44, "Tom Lane" wrote: I think we need to do at least this much for v10, because otherwise we'll face ABI issues if an extension is compiled against code with one semaphore API choice and used with code with a different one. +1, this is a good idea. Your

Re: [HACKERS] varlena beyond 1GB and matrix

2016-12-07 Thread Craig Ringer
t? Do you need to serialize this type to/from disk at all? Or just exchange it in chunks with a client? If you do need to, can you possibly do TOAST-like or pg_largeobject-like storage where you split it up for on disk storage then reassemble for use? -- Craig Ringer http:/

Re: [HACKERS] varlena beyond 1GB and matrix

2016-12-07 Thread Craig Ringer
he wire protocol, etc. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Separate connection handling from backends

2016-12-07 Thread Craig Ringer
aked in way too deep. At least, I think it'd be a slow and difficult thing to change, and would need many steps. Something like what was proposed upthread would possibly make sense as a first step. But again, I don't see anyone who's likely to actually do it. -- Craig Ringer

Re: [HACKERS] WIP: Faster Expression Processing and Tuple Deforming (including JIT)

2016-12-06 Thread Craig Ringer
On 7 December 2016 at 14:39, Craig Ringer <cr...@2ndquadrant.com> wrote: > On 7 December 2016 at 04:13, Robert Haas <robertmh...@gmail.com> wrote: > >> I wonder how feasible it would be to make this a run-time dependency >> rather than a compile option. &g

Re: [HACKERS] WIP: Faster Expression Processing and Tuple Deforming (including JIT)

2016-12-06 Thread Craig Ringer
to LLVM. So packagers can avoid a dependency on LLVM for postgres. I suspect it wouldn't be worth the complexity, the added indirection necessary, etc. If you're using packages then pulling in LLVM isn't a big deal. If you're not, then don't use --with-llvm . -- Craig Ringer

Re: [HACKERS] Separate connection handling from backends

2016-12-06 Thread Craig Ringer
? No, I don't think so. But there are potentially good things to be done in the area. What I don't see here is a patch, or a vague proposal for a patch, so I'm not sure how this can go past the hot-air stage. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development,

Re: [HACKERS] Partitionning: support for Truncate Table WHERE

2016-12-06 Thread Craig Ringer
to suggest changes to the declarative partitioning scheme that might make conditional truncate easier later. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresq

Re: [HACKERS] Back-patch use of unnamed POSIX semaphores for Linux?

2016-12-06 Thread Craig Ringer
emd was about to clobber us and log something informative, _that_ would be very nice to backpatch. I don't see how that's possible though. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hacke

Re: [HACKERS] Typmod associated with multi-row VALUES constructs

2016-12-05 Thread Craig Ringer
is numeric" and "can this column be null" even through various projections and transformations of results. But I don't think your suggested change will make the existing situation any worse. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support,

Re: [HACKERS] Document how to set up TAP tests for Perl 5.8.8

2016-12-05 Thread Craig Ringer
Ha. Good catch. Since, as you noted, it's harmless I didn't realise it'd happened. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To m

Re: [HACKERS] patch: function xmltable

2016-11-29 Thread Craig Ringer
so, not a big deal. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] pg_recvlogical --endpos

2016-11-29 Thread Craig Ringer
On 30 November 2016 at 09:18, Okano, Naoki <okano.na...@jp.fujitsu.com> wrote: > > On November 29, 2016 at 5:03 PM Craig Ringer wrote: >> Would it be better rephrased as "--endpos can only be used with --start" ? > OK. I think this phrase is better than the previous

Re: [HACKERS] Re: Use procsignal_sigusr1_handler and RecoveryConflictInterrupt() from walsender?

2016-11-29 Thread Craig Ringer
but for a walsender doing logical replication the only one that I don't think makes sense is conflict with snapshot, which won't get sent and is harmless if received. (The comment on it is slightly wrong anyway; it claims it's only used by normal user backends in transactions, but database conflict

Re: [HACKERS] pg_recvlogical --endpos

2016-11-29 Thread Craig Ringer
On 22 November 2016 at 16:52, Okano, Naoki <okano.na...@jp.fujitsu.com> wrote: > On Monday, November 21, 2016 1:08 PM Craig Ringer wrote: >> I've updated the patch for this. It's already posted on the logical >> decoding timeline following thread, so I'll avoid repeating

Re: [HACKERS] [PATCH] Logical decoding timeline following take II

2016-11-28 Thread Craig Ringer
ot;, which began as https://www.postgresql.org/message-id/flat/CAMsr+YFi-LV7S8ehnwUiZnb=1h_14PwQ25d-vyUNq-f5S5r=z...@mail.gmail.com#CAMsr+YFi-LV7S8ehnwUiZnb=1h_14PwQ25d-vyUNq-f5S5r=z...@mail.gmail.com . -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24

Re: [HACKERS] Logical decoding on standby

2016-11-27 Thread Craig Ringer
ng onstandby" feature though, since the other parts are hard to test and use in isolation. So yeah, probably, I'll do so unless someone objects. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Se

Re: [HACKERS] Logical decoding on standby

2016-11-27 Thread Craig Ringer
On 26 Nov. 2016 23:40, "Robert Haas" <robertmh...@gmail.com> wrote: > > On Wed, Nov 23, 2016 at 8:37 AM, Craig Ringer <cr...@2ndquadrant.com> wrote: > >>> The last checkpoint's oldestXid, and ShmemVariableCache's oldestXid, > >>> are already hel

Re: [HACKERS] proposal: session server side variables

2016-11-25 Thread Craig Ringer
s are accessed in query planning time). I don't really understand the purpose of an immutable variable. It seems inherently contradictory. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers maili

<    1   2   3   4   5   6   7   8   9   10   >