Re: [HACKERS] CTE inlining

2017-05-01 Thread Craig Ringer
On 2 May 2017 at 10:45, Craig Ringer wrote: > If we want fence behaviour, we should require people to declare their > desire for fence behaviour, rather than treating it as a sort of > hint-as-a-bug that we grandfather in because we're so desperate not to > admit we have hint

Re: [HACKERS] Potential hot-standby bug around xacts committed but in xl_running_xacts

2017-05-01 Thread Craig Ringer
ounds like a sensible solution to me. It avoids the need for a rather undesirable interlock between xlog and shmem commit. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgs

Re: [HACKERS] Regarding B-Tree Lookup

2017-05-02 Thread Craig Ringer
On 2 May 2017 7:34 pm, "Michael Paquier" wrote: On Tue, May 2, 2017 at 6:12 PM, Mahi Gurram wrote: > I'm building some custom extension on top of postgres 9.6.1. As part of > that, I would like to read Heap Tuple directly from my extension using > Primary Key. > > By default, postgres table inde

Re: [HACKERS] CTE inlining

2017-05-02 Thread Craig Ringer
nted and unintentional query-specific regressions let alone documented and relnoted ones. So a sad -1 to me for a GUC. Anyone big enough to be significantly upset by this planner change will have a QA/staging deployment system anyway. Or should, because we make enough other changes in a major rel

Re: [HACKERS] Re: [BUGS] BUG #14634: On Windows pg_basebackup should write tar to stdout in binary mode

2017-05-02 Thread Craig Ringer
s for reporting the issue. > With the attached patch, I was able to extract the tar file that gets > generated when the tar file is written into stdout. I tested the > the compressed tar also. > > This bug needs to be fixed in back branches also. We should do the same for pg_dump in -F

Re: [HACKERS] Function to move the position of a replication slot

2017-05-04 Thread Craig Ringer
l fine with the name, since I plan to add that capability in pg11 by running through logical decoding and ReorderBufferSkip()ing each xact until we reach the target lsn. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Servi

Re: [HACKERS] Function to move the position of a replication slot

2017-05-04 Thread Craig Ringer
On 4 May 2017 at 20:45, Magnus Hagander wrote: > On Thu, May 4, 2017 at 2:42 PM, Craig Ringer wrote: >> >> On 4 May 2017 at 20:05, Magnus Hagander wrote: >> > PFA a patch that adds a new function, pg_move_replication_slot, that >> > makes >> > it poss

Re: [HACKERS] CTE inlining

2017-05-04 Thread Craig Ringer
On 5 May 2017 02:52, "Tom Lane" wrote: Tomas Vondra writes: > On 5/4/17 8:03 PM, Joe Conway wrote: >>> I haven't been able to follow this incredibly long thread, so please >>> excuse me if way off base, but are we talking about that a CTE would be >>> silently be rewritten as an inline expressio

Re: [HACKERS] CTE inlining

2017-05-04 Thread Craig Ringer
On 5 May 2017 06:04, "Andreas Karlsson" wrote: On 05/04/2017 06:22 PM, Andrew Dunstan wrote: > I wrote this query: > > select (json_populate_record(null::mytype, myjson)).* > from mytable; > > > It turned out that this was an order of magnitude faster: > > with r as > ( >

Re: [HACKERS] CTE inlining

2017-05-04 Thread Craig Ringer
On 5 May 2017 at 08:17, Joe Conway wrote: > On 05/04/2017 05:03 PM, Craig Ringer wrote: >> On 5 May 2017 02:52, "Tom Lane" wrote: >> I haven't been keeping close tabs either, but surely we still have >> to have >> the optimization fence in (

Re: [HACKERS] MSVC odd TAP test problem

2017-05-06 Thread Craig Ringer
On 7 May 2017 4:24 am, "Andrew Dunstan" wrote: I have been working on enabling the remaining TAP tests on MSVC build in the buildfarm client, but I have come across an odd problem. The bin tests all run fine, but the recover tests crash and in such a way as to crash the buildfarm client itself a

Re: [HACKERS] Detecting schema changes during logical replication

2017-05-07 Thread Craig Ringer
On 8 May 2017 05:56, "Daniele Varrazzo" wrote: On Sun, May 7, 2017 at 8:04 PM, Andres Freund wrote: > Hi, > > On 2017-05-07 19:27:08 +0100, Daniele Varrazzo wrote: >> I'm putting together a replication system based on logical >> replication. > > Interesting. If you very briefly could recap what

Re: [HACKERS] idea: custom log_line_prefix components besides application_name

2017-05-10 Thread Craig Ringer
On 10 May 2017 10:44 am, "Chapman Flack" wrote: On 05/09/17 18:48, Mark Dilger wrote: > I don't have any positive expectation that the postgres community will go > along with any of this, but just from my point of view, the cleaner way to > do what you are proposing is something like setting a s

Re: [HACKERS] Latest Data::Dumper breaks hstore_plperl regression test

2017-05-13 Thread Craig Ringer
On 14 May 2017 11:33, "Robert Haas" wrote: On Sat, May 13, 2017 at 6:22 PM, Tom Lane wrote: > Or at least, that's what I surmise from the fact that buildfarm critter > caiman has been failing that test for the last day or so, with symptoms > indicating whitespace changes in Data::Dumper output.

Re: [HACKERS] Logical replication & corrupted pages recovery

2017-05-26 Thread Craig Ringer
On 27 May 2017 01:03, "Aleksander Alekseev" wrote: Hi Konstantin, > May be it is possible to somehow optimize it, by checking ranges of primary > key values It's possible. An optimization you are looking for is called Merkle tree [1]. Particularly it's used in Riak [2]. [1] https://en.wikipedi

Re: [HACKERS] pg_resetwal is broken if run from v10 against older version of PG data directory

2017-05-29 Thread Craig Ringer
On 30 May 2017 at 00:00, Tom Lane wrote: > I think it's just horribly dangerous to run any version of > pg_resetxlog/pg_resetwal You can pretty much stop there ;) -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training

[HACKERS] TAP: allow overriding PostgresNode in get_new_node

2017-05-30 Thread Craig Ringer
r adding --version-num to pg_config. Any objections? Will submit patch if none. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services From 8a19793c89b165c25c88cd7149650e20ef27bd55 Mon Sep 17 00:00:00 2001 From: Craig Ringer

[HACKERS] TAP backpatching policy

2017-05-30 Thread Craig Ringer
s harder) this would make it a lot more practical to do nontrivial tests in extensions - which really matters since we introduced bgworkers. Thoughts? Backpatch new TAP methods, etc, into back branches routinely? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Devel

[HACKERS] pg_config --version-num

2017-05-30 Thread Craig Ringer
le pre-formatted one at no cost to us. Personally I'd like to backpatch this into supported back branches, but just having it in pg 10 would be a help. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support,

Re: [HACKERS] pg_config --version-num

2017-05-30 Thread Craig Ringer
On 31 May 2017 9:36 am, "Michael Paquier" wrote: On Tue, May 30, 2017 at 6:14 PM, Craig Ringer wrote: > Attached is a small patch to teach pg_config how to output a --version-num > > With Pg 10, parsing versions got more annoying. Especially with > "10beta1",

Re: [HACKERS] TAP backpatching policy

2017-05-31 Thread Craig Ringer
#x27;d have a Makefile that finds and clobbers the in-tree PostgresNode.pm etc. So it's a hassle, but not the end of the world. I just suspect we'll all benefit from making it easier to write tests that work across more releases, and that updating the test modules in back branches is

Re: [HACKERS] tap tests on older branches fail if concurrency is used

2017-05-31 Thread Craig Ringer
t appears to readily reproduce on > several machines... I'll take a look at what's changed and why it's happening and get back to you. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pg

[HACKERS] Replication origins and timelines

2017-05-31 Thread Craig Ringer
ll, but by default we'll detect the error. But we can't do that unless replication origins on the downstream can track the timeline. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hacker

Re: [HACKERS] Replication origins and timelines

2017-05-31 Thread Craig Ringer
On 1 June 2017 at 09:27, Stephen Frost wrote: > Craig, > > * Craig Ringer (cr...@2ndquadrant.com) wrote: >> TL;DR: replication origins track LSN without timeline. This is >> ambiguous when physical failover is present since / >> can now represent

Re: [HACKERS] Replication origins and timelines

2017-05-31 Thread Craig Ringer
On 1 June 2017 at 09:23, Andres Freund wrote: > Hi, > > On 2017-06-01 09:12:04 +0800, Craig Ringer wrote: >> TL;DR: replication origins track LSN without timeline. This is >> ambiguous when physical failover is present since / >> can now represent

Re: [HACKERS] Replication origins and timelines

2017-05-31 Thread Craig Ringer
astics for getting logical replication to actually use it to support physical failover for pg10, so it was always going to land in pg11. This is very much a "how do we do it right when we do do it" topic, not a pg10 issue. -- Craig Ringer http://www.2ndQuadra

Re: [HACKERS] Replication origins and timelines

2017-05-31 Thread Craig Ringer
maintain slots on them. Some kind of solution that runs entirely on the standby will be needed. It's more a question of whether it's something built-in, easy, and nice, or some out of tree extension. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Develop

Re: [HACKERS] TAP: allow overriding PostgresNode in get_new_node

2017-05-31 Thread Craig Ringer
On 31 May 2017 at 08:43, Craig Ringer wrote: > Hi all > > More and more I'm finding it useful to extend PostgresNode for project > specific helper classes. But PostgresNode::get_new_node is a factory > that doesn't provide any mechanism for overriding, so you have to >

Re: [HACKERS] tap tests on older branches fail if concurrency is used

2017-05-31 Thread Craig Ringer
to fix it all up, this seems like a good argument for backporting the updated suite from 9.6 or pg10, with PostgresNode etc. I already have a working tree with that done to use src/test/recovery in 9.5, but haven't updated src/bin/scripts etc yet. -- Craig Ringer http://w

Re: [HACKERS] walsender & parallelism

2017-05-31 Thread Craig Ringer
han I'd really like to stop walsenders doing things they can't safely do during shutdown. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgr

Re: [HACKERS] proposal: PLpgSQL parallel assignemnt

2017-06-02 Thread Craig Ringer
On 2 June 2017 at 15:51, Pavel Stehule wrote: > a, b := fx(); > > Comments, notes, ideas? I'd be pretty happy to have (a, b) = (x, y); (a, b) = f(x); which is SQL-esque. But what, if anything, does Ada do? -- Craig Ringer http://www.2ndQuadrant.co

Re: [HACKERS] Do we need the gcc feature "__builtin_expect" to promote the branches prediction?

2017-06-02 Thread Craig Ringer
On 2 Jun. 2017 16:42, "Hao Lee" wrote: Hi all, There is a lot of "if statement" in system, and GCC provides a feature,"__builtin_expect", which let compilers know which branch is mostly run. Compilers and CPUs are really good at guessing this. Humans are wrong about it more than we'd l

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-05 Thread Craig Ringer
ts (row changes). If there are any cases where it's safe, they'll take some careful thought. It's only standard CTEs (SELECT-based) that I think matter for the optimisation fence behaviour. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development

Re: [HACKERS] Do we need the gcc feature "__builtin_expect" to promote the branches prediction?

2017-06-05 Thread Craig Ringer
this job. Compilers are already pretty good at this. https://en.wikipedia.org/wiki/Program_optimization -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org

Re: [HACKERS] pg_dump issues

2017-06-05 Thread Craig Ringer
rg/support/professional_support/ . (Note, I work for one of them). -- 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 subscripti

Re: [HACKERS] Challenges preventing us moving to 64 bit transaction id (XID)?

2017-06-05 Thread Craig Ringer
o if you're updating/deleting an extremely old tuple you'll presumably have to set xmin to FrozenTransactionId if it isn't already, so you can set a new epoch and xmax. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &

Re: [HACKERS] Challenges preventing us moving to 64 bit transaction id (XID)?

2017-06-06 Thread Craig Ringer
On 6 June 2017 at 12:38, Ashutosh Bapat wrote: > On Tue, Jun 6, 2017 at 10:00 AM, Tom Lane wrote: >> Ashutosh Bapat writes: >>> On Tue, Jun 6, 2017 at 9:48 AM, Craig Ringer wrote: >>>> Storing an epoch implies that rows can't have (xmin,xmax) different by >

Re: [HACKERS] Use of snapshot in logical replication

2017-06-07 Thread Craig Ringer
ped) or known not to be (so they'll be streamed out on the slot). See snapbuild.c etc. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.or

Re: [HACKERS] tap tests on older branches fail if concurrency is used

2017-06-07 Thread Craig Ringer
es sense now, and if we decide to backpatch PostgresNode (and I get the time to do it) we can clobber that fix quite happily with the full backport. Thanks Michael for the workaround. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &

Re: [HACKERS] pg_receivewal and messages printed in non-verbose mode

2017-06-13 Thread Craig Ringer
ge to me that at least the first one is written to the user as > that's not an error after promoting a standby. I agree. At least the first should be --verbose only. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Ser

Re: [HACKERS] ICU support on Windows

2017-06-13 Thread Craig Ringer
that Program Files (x86) was added to punish people who fail to handle paths with spaces properly and finally make sure that everything got fixed. Because apparently "Program Files" wasn't annoying enough already. Ha, as if. People hard-code PROGRA~1 (the DOS shortname). And

Re: [HACKERS] Decimal64 and Decimal128

2017-06-15 Thread Craig Ringer
any references to that anymore. POWER6 and POWER7 has it, which is great, but hardly justifies a push for getting it into the core Pg. Some of the discussion on https://software.intel.com/en-us/articles/intel-decimal-floating-point-math-library?page=1 suggests that doing it fully in hardware i

Re: [HACKERS] logical replication read-only slave

2017-06-15 Thread Craig Ringer
m design idea here and following up with a patch if you get a reasonable approximation of consensus. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@pos

Re: [HACKERS] shm_mq_wait_internal gets stuck forever on fast shutdown

2017-08-21 Thread Craig Ringer
applying shm_mq to non-bgworker endpoints. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [HACKERS] WIP: Separate log file for extension

2017-08-27 Thread Craig Ringer
be left as stubs initially. So the outcome would be the same, just without the assumption of specific file name and output mechanism baked in. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

[HACKERS] psql --batch

2017-08-27 Thread Craig Ringer
Hi all I find myself regurgitating the incantation psql -qAtX -v ON_ERRORS_STOP=1 quite a bit. It's not ... super friendly. It strikes me that we could possibly benefit from a 'psql --batch' option. Thoughts? -- Craig Ringer http://www.2ndQuadrant.c

[HACKERS] Make pg_regress print a connstring with sockdir

2017-08-27 Thread Craig Ringer
e attached? If you'd prefer nicer wording at the expense of two lines, maybe running with PID 16409 connection string: 'port=50848 host=/tmp/blah' -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services From 5b242d

Re: [HACKERS] psql --batch

2017-08-28 Thread Craig Ringer
an the first two, though, as I can at least think of some cases where you might want it. X: skip .psqlrc Reliable, portable scripted psql shouldn't be using the local .psqlrc IMO. It's likely to just break things in exciting ways. But I can see it being reasonable to require this

Re: [HACKERS] Make pg_regress print a connstring with sockdir

2017-08-28 Thread Craig Ringer
st 2017 at 14:08, Michael Paquier wrote: > On Mon, Aug 28, 2017 at 2:28 PM, Craig Ringer > wrote: > > It's a pain having to find the postmaster command line to get the port > > pg_regress started a server on. We print the port in the pg_regress > output, > > why

Re: [HACKERS] Make pg_regress print a connstring with sockdir

2017-08-28 Thread Craig Ringer
On 28 August 2017 at 15:19, Michael Paquier wrote: > On Mon, Aug 28, 2017 at 4:07 PM, Craig Ringer > wrote: > > == starting postmaster== > > running with PID 30235; connect with: > > psql "host='/tmp/pg_regress-j74

Re: [HACKERS] psql --batch

2017-08-28 Thread Craig Ringer
ong option version if -B is added, and it is >> auto-completion friendly. > > > This doesn't really address the original issue though, that it's far from obvious how to easily and correctly script psql. I guess there's always the option of a docs patch for that. *shrug* I'll see what others have to say. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [HACKERS] psql --batch

2017-08-28 Thread Craig Ringer
so's anything really. null bytes aren't usable for all scripts, and nothing else cannot also be output in the data its self. No easy answers there. In cases where I expect that to be an issue I sometimes use \COPY ... TO STDOUT WITH (FORMAT CSV) though. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [HACKERS] Make pg_regress print a connstring with sockdir

2017-08-28 Thread Craig Ringer
On 28 August 2017 at 19:45, Tom Lane wrote: > Craig Ringer writes: > > It's a pain having to find the postmaster command line to get the port > > pg_regress started a server on. We print the port in the pg_regress > output, > > why not the socket directory / ho

Re: [HACKERS] Custom allocators in libpq

2017-08-28 Thread Craig Ringer
s and pass it to a connect function. I pretty much always just put the user's original connstring in 'dbname' and set expand_dbname = true instead. It might make sense to have any new function accept PQconninfoOption*. Or a variant of PQconninfoParse that populates k/v arrays with 'n' extra fields allocated and zeroed on return, I guess. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [HACKERS] [PATCH] Fix drop replication slot blocking instead of returning error

2017-08-29 Thread Craig Ringer
the new behavior was needed for internal > > future functions since the doc wasn't changed. > > FWIW, I also don't think it's ok to just change the behaviour > unconditionally and without a replacement for existing behaviour. Seems like it just needs a new argument nowait DEFAULT false Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [HACKERS] WIP: Failover Slots

2017-09-06 Thread Craig Ringer
On 14 August 2017 at 11:56, Craig Ringer wrote: > > I don't want to block failover slots on decoding on standby just because > decoding on standby would be nice to have. > However, during discussion with Tomas Munro a point has come up that does block failover slots as cur

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-09-12 Thread Craig Ringer
PQbatchSyncQueue >> > + >> > + PQbatchSyncQueue >> > + >> > + >> >> I wonder why this isn't framed as PQbatchIssue/Send/...()? Syncing seems >> to mostly make sense from a protocol POV. >> >> > Renamed to PQ

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-09-12 Thread Craig Ringer
On 13 September 2017 at 13:44, Vaishnavi Prabakaran < vaishnaviprabaka...@gmail.com> wrote: > Thanks for explaining. Will change this too in next version. > > Thankyou, a lot, for picking up this patch. -- Craig Ringer http://www.2ndQuadrant.com/ Postgre

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-09-14 Thread Craig Ringer
emit raw flags by default, so FROZEN would't be shown at all, only COMMITTED|INVALID. If the bool to decode combined flags is set, then it'll show things like FROZEN, and hide COMMITTED|INVALID. Similar for other combos. -- Craig Ringer http://www.2ndQuadrant.com/

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Craig Ringer
help. At some point we'll also want to be able to enumerate background workers and get handles for existing workers. Also, let background workers recover from errors without exiting, which means factoring a bunch of stuff out of PostgresMain. But both of those are bigger jobs. -- Craig Ringer

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Craig Ringer
d (b) the postmaster remembering bgworker registrations across crash restart with no way to tell it not to. Maybe Petr remembers the details? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [HACKERS] Show backtrace when tap tests fail

2017-09-19 Thread Craig Ringer
On 20 September 2017 at 06:36, David Steele wrote: > > I just use: > > $SIG{__DIE__} = sub {Carp::confess @_}; > That's what I patched into my TestLib.pm too, until I learned of Carp::Always. I'd rather have Carp::Always, but it's definitely an O

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Craig Ringer
On 20 September 2017 at 11:53, Tom Lane wrote: > Craig Ringer writes: > > On 19 September 2017 at 18:04, Petr Jelinek < > petr.jeli...@2ndquadrant.com> > > wrote: > >> If you are asking why they are not identified by the > >> BackgroundWorkerHandle,

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Craig Ringer
On 20 September 2017 at 12:06, Amit Kapila wrote: > On Wed, Sep 20, 2017 at 9:23 AM, Tom Lane wrote: > > Craig Ringer writes: > >> On 19 September 2017 at 18:04, Petr Jelinek < > petr.jeli...@2ndquadrant.com> > >> wrote: > >>> If y

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Craig Ringer
On 20 September 2017 at 12:16, Craig Ringer wrote: > The thought I had in mind upthread was to get rid of logicalrep slots >> in favor of expanding the underlying bgworker slot with some additional >> fields that would carry whatever extra info we need about a logicalrep >>

[HACKERS] Utilities for quoting literals and identifiers in Pg TAP tests

2017-09-19 Thread Craig Ringer
Hi all Here's a little utility class I wrote for value and identifier quoting for use in TAP tests. Might be handy for others. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services PGValues.pm Description: Per

Re: [HACKERS] Error: dsa_area could not attach to a segment that has been freed

2017-09-20 Thread Craig Ringer
g > long lived DSA area you have nothing like that. We need, IMO, a DSA-backed heirachical MemoryContext system. We can't use the exact MemoryContext API as-is due to the need for far pointers though :( -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [HACKERS] Error: dsa_area could not attach to a segment that has been freed

2017-09-20 Thread Craig Ringer
On 20 September 2017 at 17:52, Craig Ringer wrote: > On 20 September 2017 at 16:55, Thomas Munro > wrote: > >> On Wed, Sep 20, 2017 at 6:14 PM, Gaddam Sai Ram >> wrote: >> > Thank you very much! That fixed my issue! :) >> > I was in an assumption

Re: [HACKERS] Error: dsa_area could not attach to a segment that has been freed

2017-09-20 Thread Craig Ringer
On 21 September 2017 at 05:50, Thomas Munro wrote: > On Thu, Sep 21, 2017 at 12:59 AM, Robert Haas > wrote: > > On Wed, Sep 20, 2017 at 5:54 AM, Craig Ringer > wrote: > >> By the way, dsa.c really needs a cross-reference to shm_toc.c and vice > >> vers

Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.

2017-09-21 Thread Craig Ringer
t. > Another one to watch out for is that elog(...) and ereport(...) invoke CHECK_FOR_INTERRUPTS. That's given me exciting surprises before when combined with assertion checking and various exit cleanup hooks. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [HACKERS] Built-in plugin for logical decoding output

2017-09-24 Thread Craig Ringer
or Amazon then? But now there's a new home-invented plugin that we should adopt, ignoring any of the existing ones. Why? https://github.com/apigee-labs/transicator/tree/master/pgoutput > No README? Why did this need to be invented, rather than using an existing plugin? I don't

Re: [HACKERS] Built-in plugin for logical decoding output

2017-09-24 Thread Craig Ringer
t some time ago but ran into some issues and time constraints. Because of the need to support older versions I'm now committed to an approach using direct libpq connections and function calls instead, but it seems like a real shame to do that when the replication protocol connection is *r

Re: [HACKERS] Built-in plugin for logical decoding output

2017-09-25 Thread Craig Ringer
much care for that. Personally I'd be more friendly toward Amazon / Google / etc wanting us to include things for their convenience if they actually usefully contributed to development and maintenance of Pg. -- Craig Ringer

Re: [HACKERS] Built-in plugin for logical decoding output

2017-09-25 Thread Craig Ringer
>>> >>> https://www.2ndquadrant.com/en/resources/2ndqpostgres/ >>> >> >> This doesn't seem like a good way to argue. >> >> > Sorry, that wasn't supposed to be negative. My point was that 2ndQuadrant > has a distribution of Post

Re: [HACKERS] Built-in plugin for logical decoding output

2017-09-26 Thread Craig Ringer
;s done well. That said, I'm all in favour of a generic json output plugin that shares infrastructure with logical replication, so people who are on inflexible environments have a fallback option. I just don't care to write it. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [HACKERS] Built-in plugin for logical decoding output

2017-09-26 Thread Craig Ringer
noted, we can likely use pgoutput for that to some extent at least. I think the pressing need is json, going by the zillion plugins out there for it. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [HACKERS] Built-in plugin for logical decoding output

2017-09-26 Thread Craig Ringer
t impossible, but probably irritating and verbose. And you'd have none of the DDL required to manage it, so you'd need SQL-function equivalents. I suspect you'd be better off tweaking pglogical to speak the same protocol as pg10, since the pgoutput protocol is an evolution of p

Re: [HACKERS] pg_prepared_xact_status

2017-09-29 Thread Craig Ringer
built-in transaction resolver; then I think it's probably not going to get far. I could see a full DTC resolver in postgres one day, once we have things like working in-core logical rep based multi-master with 2PC support. But that's a looong way off. -- Craig Ringer

Re: [HACKERS] pg_prepared_xact_status

2017-09-29 Thread Craig Ringer
o-ordinate. It can't do anything else, since if it unilaterally commits or rolls back it might later find out that the nodes on the other side of the network partition or whatever made the opposite decision and, boom! -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [HACKERS] pg_prepared_xact_status

2017-10-01 Thread Craig Ringer
id. If we get better about that, then we might need some way to ask Pg to keep extra clog. But for now it works well enough. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [HACKERS] pg_prepared_xact_status

2017-10-01 Thread Craig Ringer
x27;m not opposed, I just don't really see the point. I'm not seeing where it'd come in useful. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [HACKERS] [PATCH] Off-by-one error in logical slot resource retention

2017-10-01 Thread Craig Ringer
ther > > in the process? > > Since this patch has been in Waiting for Author state for the duration of > the > commitfest without moving, I’m marking it Returned with Feedback. If > there is > still interest in pursuing this patch, please re-submit it to the next > commitfest with the comments addressed. > Thanks. I'll revisit it next CF. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [HACKERS] security labels on databases are bad for dump & restore

2015-07-26 Thread Craig Ringer
e, and in pg_dump -Fc . In practice I see zero real use of pg_dumpall without --globals-only, and almost everyone does pg_dump -Fc . I'd like to see that method case actually preserve the whole state of the system and do the right thing sensibly. A pg_restore option to skip database-level se

Re: [HACKERS] raw output from copy

2015-07-26 Thread Craig Ringer
to do it, try to do it, and have problems doing it. So it's a solution a real issue. -- 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] Autonomous Transaction is back

2015-07-28 Thread Craig Ringer
no need to check the parent list until we actually try to wait on a lock, though I don't know whether it's practical to delay until then. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hac

Re: [HACKERS] proposal: multiple psql option -c

2015-07-28 Thread Craig Ringer
s. Personally I find -c awkward due to the need to worry about shell quoting and tend to prefer a quoted here-document lots of the time anyway. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers

Re: [HACKERS] More WITH

2015-08-18 Thread Craig Ringer
gated for its types. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services On 18 August 2015 at 01:18, David Fetter wrote: > Folks, > > In the interest of consistency, which is to say, of not hitting >

Re: [HACKERS] How to compile, link and use a C++ extension

2015-08-18 Thread Craig Ringer
exposing a pure C interface that your extension can then link to as just another library via PGXS's SHLIB_LINK option. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (

Re: [HACKERS] Case sensitive mode in windows build option

2014-01-13 Thread Craig Ringer
n we can make it case insensitive. The idea seems reasonable, the implementation does not. You've changed the meaning rather more than making it case insensitive. Use the Perl 'lc' function to compare a lower-cased input instead. http://perldoc.perl.org/functions/lc.html -- Craig

Re: [HACKERS] Case sensitive mode in windows build option

2014-01-14 Thread Craig Ringer
On 01/14/2014 05:35 PM, Dilip kumar wrote: > On 01/14/2014 11:25 AM Craig Ringer Wrote, > >>> As per current behavior if user want to build in debug mode in >>> windows, then he need to give debug in capital letters (DEBUG), >>> >>> I think many user will

Re: [HACKERS] WAL Rate Limiting

2014-01-14 Thread Craig Ringer
it's easy enough to convert WAL MB/s into a delay by hand. Initial tests of this show that it does limit index creation rates as expected, while continuing to allow WAL generation at normal rates for other concurrent work. -- Craig Ringer http://www.2ndQuadrant.com/ Postg

Re: [HACKERS] Why conf.d should be default, and auto.conf and recovery.conf should be in it

2014-01-15 Thread Craig Ringer
onf.d greatly more useful when enabled by default. The need to hack postgresql.conf to use it eliminates half the point of having it. I haven't seen any compelling reason why conf.d should NOT be enabled by default. -- Craig Ringer http://www.2ndQuadrant.com/ Postgr

Re: [HACKERS] Changeset Extraction v7.0 (was logical changeset generation)

2014-01-16 Thread Craig Ringer
ncoding. That's not the case right now - so since we support it, we'd better guard against its quirks. slotnames can't be regular identifiers, because they might contain chars not valid in another DB's encoding. So lets just restrict them to [a-zA-Z0-9_ -] and be done with it. --

Re: [HACKERS] WAL Rate Limiting

2014-01-16 Thread Craig Ringer
and index rebuilds, while everything else runs full tilt". Or do you propose to just do this per-session? If so, what about autovacuum? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hac

Re: [HACKERS] Changeset Extraction v7.0 (was logical changeset generation)

2014-01-18 Thread Craig Ringer
On 01/18/2014 09:31 PM, Robert Haas wrote: > On Thu, Jan 16, 2014 at 10:15 PM, Craig Ringer wrote: >> Anybody who actually uses SHIFT_JIS as an operational encoding, rather >> than as an input/output encoding, is into pain and suffering. Personally >> I'd be quite ha

Re: [HACKERS] [PATCH] Fix double-inclusion of pg_config_os.h when building extensions with Visual Studio

2014-01-19 Thread Craig Ringer
anyone's doing standalone Visual Studio based builds at the moment, and if they are they'll have already had to define WIN32 themselves so they won't notice. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & S

Re: [HACKERS] [v9.4] row level security

2014-01-19 Thread Craig Ringer
o 9.4 would be great. I'm aware of multiple interested users who originally expected this in 9.3. That hasn't worked out, but it'd be great to make 9.4. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Servic

Re: [HACKERS] currawong is not a happy animal

2014-01-19 Thread Craig Ringer
On 01/18/2014 12:26 AM, David Rowley wrote: > -#if defined(_WIN32) > +#if defined(_WIN32) && !defined(WIN32) That makes sense, since we force WIN32 in the build system. I should've seen that. Thanks for catching it. -- Craig Ringer http://www.2ndQuadra

Re: [HACKERS] ALTER TABLE ... SET TABLESPACE pg_default

2014-01-19 Thread Craig Ringer
space and backpatch accordingly. Sounds sensible. I just stumbled across a report of this bug, too: http://stackoverflow.com/questions/21193127/avoid-users-to-create-tables-on-default-tablespace -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Su

Re: [HACKERS] WIP patch (v2) for updatable security barrier views

2014-01-20 Thread Craig Ringer
On 01/21/2014 09:09 AM, KaiGai Kohei wrote: > (2014/01/13 22:53), Craig Ringer wrote: >> On 01/09/2014 11:19 PM, Tom Lane wrote: >>> Dean Rasheed writes: >>>> My first thought was that it should just preprocess any security >>>> barrier quals in subquer

<    3   4   5   6   7   8   9   10   11   12   >