Re: Proposal: http2 wire format

2018-03-26 Thread Craig Ringer
here's no one-size-fits-all answer. If you just assume, say, that everything happens over TLS with password auth or x.509 client certs, you'll create a giant mess for all the sites that use Kerberos or SSPI. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Proposal: http2 wire format

2018-03-26 Thread Craig Ringer
her high backend startup/shutdown costs? There's a reason everyone with high rates of small simple queries uses poolers right now. Such a protocol would help poolers a lot, but not gain a great deal for the core server without some kind of backend pooling, which is a huge separate topic. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Replication origins conflate two separate functions

2018-03-26 Thread Craig Ringer
ns tracks state so you can use pg_replication_origin_xact_setup without an active session-origin. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Function to get a txn's replication origin

2018-03-26 Thread Craig Ringer
available there too. It was already record-returning so I'm not overly concerned about adding a column. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services From e022ad7168936800fb18f397e7f42538871e27d3 Mon Sep 17 00:00:00 200

Re: Backend memory dump analysis

2018-03-25 Thread Craig Ringer
at. Function pointers instead of char* ? It adds a significant potential stability risk to MemoryContextStats() calls, but a great deal of flexibility. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Backend memory dump analysis

2018-03-25 Thread Craig Ringer
emoryContextSwitchTo(func_cxt); > > function->fn_signature = format_procedure(fcinfo->flinfo->fn_oid); > + MemoryContextSetIdentifier(func_cxt, function->fn_signature); > function->fn_oid = fcinfo->flinfo->fn_oid; > function->fn_xmin = HeapTu

Re: Proposal: http2 wire format

2018-03-25 Thread Craig Ringer
amiliar with: - git rebase - git cherry-pick - git merge - git reflog (for when you make mistakes with the above) Consider maintaining a public git repo with the current working branch. Tag versions if you refer to them in mailing list posts etc, so that people know the exact code you were referring to. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Re: Rewriting the test of pg_upgrade as a TAP test - take two

2018-03-21 Thread Craig Ringer
e idea of multi-version support in TAP, if that's what you mean. Why? Because I use TAP heavily in extensions. Especially replication extensions. Which like to talk across multiple versions. I currently need external test frameworks and some hideous hacks to do this. -- Craig Ringer

Re: handling of heap rewrites in logical decoding

2018-03-21 Thread Craig Ringer
On 21 March 2018 at 21:20, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 3/21/18 03:08, Craig Ringer wrote: > > Why was relrewrite / Anum_pg_class_relrewrite inserted at position 28, > > not appended to pg_class? > > > > I don't see how it'd

Re: handling of heap rewrites in logical decoding

2018-03-21 Thread Craig Ringer
On 16 March 2018 at 10:54, Craig Ringer <cr...@2ndquadrant.com> wrote: > On 16 March 2018 at 08:51, Peter Eisentraut <peter.eisentraut@2ndquadrant. > com> wrote: > >> On 2/28/18 13:52, Peter Eisentraut wrote:> Second version, which uses an >> OID. I added

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-19 Thread Craig Ringer
re module, as is Test::More. Sigh. Yes, looks like tests are necessary. I'd argue it's "test for broken Perl" but apparently Fedora think they should split the Perl core dist into tiny pieces. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: HELP

2018-03-18 Thread Craig Ringer
th that. If you can't then your chances of successfully completing a project are quite low. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: handling of heap rewrites in logical decoding

2018-03-15 Thread Craig Ringer
rebased update of this patch. No functionality changes > compared to v2. > Picking this up for review. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Google Summer of Code: Potential Applicant

2018-03-12 Thread Craig Ringer
e to choose. > > I don't suppose I can interest you in wire-protocol compression support instead? Probably not if you're more interested in an algorithms and data science angle. But I can hope ;) -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Google Summer of Code: Potential Applicant

2018-03-12 Thread Craig Ringer
it isn't very source-compatible across versions. Consider protobuf instead. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: disable SSL compression?

2018-03-10 Thread Craig Ringer
On 9 March 2018 at 14:17, Gasper Zejn <z...@owca.info> wrote: > On 09. 03. 2018 06:24, Craig Ringer wrote: > > I'm totally unconvinced by the threat posed by exploiting a client by > tricking it into requesting protocol compression - or any other protocol > change t

Re: disable SSL compression?

2018-03-08 Thread Craig Ringer
il.gmail.com [2] https://www.postgresql.org/message-id/CAMsr%2BYH0N7TaAtvS2hu- y8LBkA25fJs0oungGe-tNhwr7scLSQ%40mail.gmail.com -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: RFC: Add 'taint' field to pg_control.

2018-03-07 Thread Craig Ringer
On 8 March 2018 at 12:34, Tom Lane <t...@sss.pgh.pa.us> wrote: > Craig Ringer <cr...@2ndquadrant.com> writes: > > As I understand it, because we allow multiple Pg instances on a system, > we > > identify the small sysv shmem segment we use by the postm

Re: RFC: Add 'taint' field to pg_control.

2018-03-07 Thread Craig Ringer
On 8 March 2018 at 10:18, Andres Freund <and...@anarazel.de> wrote: > > > On March 7, 2018 5:51:29 PM PST, Craig Ringer <cr...@2ndquadrant.com> > wrote: > >My favourite remains an organisation that kept "fixing" an issue by > >kill > >-9'in

Re: RFC: Add 'taint' field to pg_control.

2018-03-07 Thread Craig Ringer
On 8 March 2018 at 04:58, Robert Haas <robertmh...@gmail.com> wrote: > On Wed, Feb 28, 2018 at 8:03 PM, Craig Ringer <cr...@2ndquadrant.com> > wrote: > > A huge +1 from me for the idea. I can't even count the number of black > box > > "WTF did you DO?!?&

Re: Re: BUGFIX: standby disconnect can corrupt serialized reorder buffers

2018-03-06 Thread Craig Ringer
On 6 March 2018 at 16:07, Craig Ringer <cr...@2ndquadrant.com> wrote: > On 6 March 2018 at 09:58, Craig Ringer <cr...@2ndquadrant.com> wrote: > >> On 5 March 2018 at 23:25, David Steele <da...@pgmasters.net> wrote: >> >>> Hi Craig, >>>

Re: Re: BUGFIX: standby disconnect can corrupt serialized reorder buffers

2018-03-05 Thread Craig Ringer
On 5 March 2018 at 23:25, David Steele <da...@pgmasters.net> wrote: > Hi Craig, > > On 1/21/18 5:45 PM, Craig Ringer wrote: > > On 6 January 2018 at 08:28, Alvaro Herrera <alvhe...@alvh.no-ip.org > > <mailto:alvhe...@alvh.no-ip.org>> wrote: > > &g

Re: 2018-03 Commitfest Summary (Andres #1)

2018-03-03 Thread Craig Ringer
On 4 March 2018 at 14:58, Pavel Stehule <pavel.steh...@gmail.com> wrote: > > > 2018-03-04 3:09 GMT+01:00 Craig Ringer <cr...@2ndquadrant.com>: > >> On 3 March 2018 at 17:56, Fabien COELHO <coe...@cri.ensmp.fr> wrote: >> >>> >>> The (triv

Re: 2018-03 Commitfest Summary (Andres #1)

2018-03-03 Thread Craig Ringer
Something confine-able like JavaScript or Lua. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: 2018-03 Commitfest Summary (Andres #1)

2018-03-03 Thread Craig Ringer
ke batching updates; sync commit changes for standby consistency, etc. That's not a reason to throw anything and everything into pgbench. But there's value to more than measuring raw tps. Also, I'm not the one doing the work. -- Craig Ringer http://www.2ndQuadrant.com/ Pos

Re: 2018-03 Commitfest Summary (Andres #1)

2018-03-03 Thread Craig Ringer
wouldn't be a big problem, but it's eating into limited committer hours > and I'm not really convinced that we're getting adequate return. I have similar worries about us growing an ad-hoc scripting language in psql. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [HACKERS] GSOC'17 project introduction: Parallel COPY execution with errors handling

2018-03-02 Thread Craig Ringer
On 3 March 2018 at 13:08, Peter Eisentraut <peter.eisentr...@2ndquadrant.com > wrote: > On 1/22/18 21:33, Craig Ringer wrote: > > We don't have much in the way of rules about what input functions can or > > cannot do, so you can't assume much about their behaviour and

Re: Testing "workers launched" in expected output? Really?

2018-03-02 Thread Craig Ringer
or example. Easier said than done without requiring a total change in how all expected files are written, unfortunately. "magic tags" to open a regexp section of expected file are all well and good, but then we can't just use diff anymore... -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: 2018-03 Commitfest Summary (Andres #4)

2018-03-02 Thread Craig Ringer
be for final CF since it's minor. Still no time for libpq pipelining :( -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

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

2018-03-01 Thread Craig Ringer
umber them. Right now they appear to be out of > order in your email. I suggest using git format-patch, that does all > the necessary work for you. > > Yep, specially git format-patch with a -v argument, so the whole patchset is visibly versioned and sorts in the correct order. -

Re: Two-phase update of restart_lsn in LogicalConfirmReceivedLocation

2018-02-28 Thread Craig Ringer
y impossible. It seems astonishingly unlikely, but that's not always good enough. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Online enabling of checksums

2018-02-28 Thread Craig Ringer
to change how we generate relfilenode IDs, making them totally independent of the oid space. Unsure how practical it is, but it'd be so nice to get rid of that trap. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: RFC: Add 'taint' field to pg_control.

2018-02-28 Thread Craig Ringer
refine the fsync part to get rid of false positives due to bulk loading) and build on from there in subsequent work. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: RFC: Add 'taint' field to pg_control.

2018-02-28 Thread Craig Ringer
CheckPointGuts and CheckPointBuffers suggests we don't presently do that but I admit I haven't read in depth. We force a fsync of the current WAL segment when switching fsync on, but don't do anything else AFAICS. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: RFC: Add 'taint' field to pg_control.

2018-02-28 Thread Craig Ringer
ody kill -9'ing the postmaster, then removing the postmaster.pid and starting up again without killing the workers -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: row filtering for logical replication

2018-02-28 Thread Craig Ringer
his). It might be worth looking at the current logic for CHECK expressions, since the requirements are similar. In my opinion you could safely not bother with allowing access to user catalog tables in the filter expressions and limit them strictly to immutable functions and the tuple its self. -- Craig R

Re: Using JSONB directly from application

2018-02-26 Thread Craig Ringer
n in PostgreSQL development. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: handling of heap rewrites in logical decoding

2018-02-25 Thread Craig Ringer
ilter-out, plugins would indicate "actually I want to choose about this one" or "I understand table rewrites". I'd prefer not to add another change callback. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Translations contributions urgently needed

2018-02-22 Thread Craig Ringer
; Do you have any recommendation for such tools? > > I was last involved a long time ago, so I don't have direct experience. But I've head people speaking of how much it can help. A look around finds a few things of interest like http://pootle.translatehouse.org/index.html https://translate

Re: Translations contributions urgently needed

2018-02-22 Thread Craig Ringer
are NOT willing to interact with git (or at the time, svn) and the other tools many of us take for granted. Can more be gained with user-friendly, probably web-based, translation tools to make translation updating more accessible? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [bug fix] Produce a crash dump before main() on Windows

2018-02-21 Thread Craig Ringer
sense; it's too niche, and too early. I'd be in favour of leaving WER on when we find out we're in a noninteractive service too, but that'd be a separate patch for pg11+ only. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [bug fix] Produce a crash dump before main() on Windows

2018-02-20 Thread Craig Ringer
On 20 February 2018 at 22:18, Craig Ringer <cr...@2ndquadrant.com> wrote: > So I'm all for just removing that. > ... but just to be clear, about -1000 on backpatching any such thing. At most, a new GUC that defaults to the current behaviour. But I think it's pretty niche really.

Re: [bug fix] Produce a crash dump before main() on Windows

2018-02-20 Thread Craig Ringer
er as the hander (I always wondered why that didn't work!) and is generally just painful. It prevents us from collecting data via Microsoft about crashes, should we wish to do so. And who runs Pg on windows except as a service?! So I'm all for just removing that. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Documenting PROVE_TESTS in section of TAP tests

2018-02-18 Thread Craig Ringer
ntion is only in src/test/perl/README where I doubt people routinely running the tests will see it. I think I put it there mainly to help people writing/fixing tests. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Parameter status message not sent?

2018-02-13 Thread Craig Ringer
ConfigReloadPending = false; > ProcessConfigFile(PGC_SIGHUP); > } > > which'll then, in turn, send out ParameterStatus messages for changed > GUC_REPORT GUCs. I was wondering a while ago - can't we just set our own proc's latch here, so we wake up and send it earlier if we're in the idle main loop? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Is there a cache consistent interface to tables ?

2018-02-11 Thread Craig Ringer
g up the ram to 512gb as a RAM > disk just for consistent profiling (an old bad habit). > > I'm reassessing my profiling plan. I'm getting ahead of myself thinking > the OS is not having a significant effect. > Definitely. Especially since PostgreSQL uses buffered I/O. -- Craig

Re: Is there a cache consistent interface to tables ?

2018-02-10 Thread Craig Ringer
Kafka. pglogical3 will also have some features related to feeding changes to Kafka by the way. > One more fact I forgot to add.. The insert load into the database is about > 2kb/record or about 200MB/s. > So you're presumably rotating partitions or something; ageing things out. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Is there a cache consistent interface to tables ?

2018-02-09 Thread Craig Ringer
e/outage etc. Otherwise you can never, ever, ever upgrade, diagnostics and maintenance are harder, etc. Don't fire-and-forget. It can be a simple producer/consumer that writes sequentially to a collection of buffer files or whatever. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: In logical replication concurrent update of partition key creates a duplicate record on standby.

2018-02-07 Thread Craig Ringer
is available at a suitable level. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: PostgreSQL crashes with SIGSEGV

2018-02-06 Thread Craig Ringer
e using. > Definitely is using, in the case of BDR and pglogical. But we can patch in a version check easily enough. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Better Upgrades

2018-02-05 Thread Craig Ringer
nd goal. Just start Pg12 on top of a pg11 datadir with the --allow-upgrade flag and you're done. But I don't think I'm any keener to do the drudgery required to implement it than anyone else is... and I share others' concerns about the maintenance burden imposed, impact on future catalog change freedo

Re: Better Upgrades

2018-02-05 Thread Craig Ringer
od where there are no prepared txns on the old master, since we don't currently decode and send txns until COMMIT PREPARED time. So we'd lose prepared-but-not-committed txns if we cut over while they existed. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: pie-in-sky idea: 'sensitive' function parameters

2018-02-02 Thread Craig Ringer
he function-interface level, or if it'd have to be done in the Bind message to make it reliable and available early enough. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: JIT compiling with LLVM v9.1

2018-01-29 Thread Craig Ringer
.h reclares + * inet_net_ntop. If we don't annotate it the same way as the prototype in + * we'll upset g++, so we must use __THROW from . If + * we're not on glibc, we need to define it away. + */ +#ifndef __GNU_LIBRARY__ +#define __THROW +#endif + /* /port compatibility functions */ #include &quo

Re: Linking PostgreSQL as a C++ program

2018-01-28 Thread Craig Ringer
On 29 January 2018 at 18:02, Michael Paquier <michael.paqu...@gmail.com> wrote: > On Mon, Jan 29, 2018 at 05:46:54PM +1300, Craig Ringer wrote: > > extern "C" { > > #include "postgres.h" > > } > > Don't you need __cplusplus as well?

Linking PostgreSQL as a C++ program

2018-01-28 Thread Craig Ringer
imagine how likely a patch that adds c++11 code to the core server would be to get accepted ;) -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Redefining inet_net_ntop

2018-01-28 Thread Craig Ringer
On 29 January 2018 at 17:07, Tom Lane <t...@sss.pgh.pa.us> wrote: > > Another choice would be to stick a pg_ prefix on the function name. > That, plus a comment, seems just fine to me. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Developmen

Re: Redefining inet_net_ntop

2018-01-28 Thread Craig Ringer
W and causes #include "postgres.h" to fail. Sure, I can add a hack to c.h to define _THROW as a no-op when not on glibc and all that, assuming I get far enough with this extension to bother. But it made me ask why we have this duplication in the first place, hence this post. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Redefining inet_net_ntop

2018-01-25 Thread Craig Ringer
if configure finds it. Objections? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Is it valid to have logical replication between 2 databases on the same postgres server?

2018-01-24 Thread Craig Ringer
d in the right direction? > > Nope, that's not it at all. Logical decoding and logical rep works fine within a db instance. It's a problem with logical decoding setup needing to see all txns open at the time of slot creation complete before it can return. But there's a txn open wait

Re: [HACKERS] GSOC'17 project introduction: Parallel COPY execution with errors handling

2018-01-22 Thread Craig Ringer
their own geometry and geography data types that are a great deal more > complicated. > > For example, an input function could conceivably take a lwlock, do some work in the heapam, or whatever. We don't have much in the way of rules about what input functions can or cannot do, so

Re: BUGFIX: standby disconnect can corrupt serialized reorder buffers

2018-01-21 Thread Craig Ringer
o" files in your > replication slot dirs, you deserve a PANIC anyway, but I'm not sure. > I'm happy to address those comments. The PANIC probably made sense when it was only done on startup, but not now it's at runtime. The rest is mainly retained from the prior code, but it's a g

Re: let's make the list of reportable GUCs configurable (was Re: Add %r substitution for psql prompts to show recovery status)

2018-01-21 Thread Craig Ringer
for years, so it's pointless to have it at all". Why add protocol v3? PostgreSQL is a stable, long term project, and I'd like to plan for the future. I also think people are way more likely to handle things like --with-extra-version correctly when dealing with server_version_num, where

Re: bytea bitwise logical operations implementation (xor / and / or / not)

2018-01-21 Thread Craig Ringer
be a big help. So would casts from bit varying or bytea <-> integer and other types. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: pgbench - add \if support

2018-01-21 Thread Craig Ringer
formal way instead? Embed a lua interpreter or something? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Package version in PG_VERSION and version()

2018-01-02 Thread Craig Ringer
ese issues are why I've pushed repeatedly to make server_version_num GUC_REPORT, and expose PG_VERSION_NUM in pg_config, without success. I still think it needs doing. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Contributing with code

2017-12-31 Thread Craig Ringer
this? where did they get stuck?" I'd rather rename it the "stuck, hard and abandoned projects list" ;) For example I try to keep track of protocol-related stuff there, so that if/when we do a real protocol revision we don't fail to consider things that have come up and since been forgotten.

Re: [PATCH] session_replication_role = replica with TRUNCATE

2017-12-29 Thread Craig Ringer
the fact that for DML it's > implemented using triggers, but that's not true for TRUNCATE. In any > case it does not hurt to mention the FKs explicitly rather than > implicitly here. Yeah. I'd argue that's an oversight in the current docs that "can cause FK violations" isn't mentione

Re: [PATCH] session_replication_role = replica with TRUNCATE

2017-12-29 Thread Craig Ringer
you creating the FK. I'd still like to know if it was a cascade when applying it, so I can possibly make some client-determined behaviour choice, but that's for the other patch really. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: TAP test module - PostgresClient

2017-12-28 Thread Craig Ringer
ntain them. But if we teach the test suite how to build and run them scoped to the current Pg build using PERL5LIB, users wouldn't *have* to. Internet access could be a sticking point for some, but the same would be true of using something like PgPP unless we bundled it in the Pg tree. -- Cr

Re: Contributing with code

2017-12-28 Thread Craig Ringer
oblem, I don't see how it'd be practical to handle them, you'd have to be able to register as interested in another DB's invals somehow. And you'd have no locking. So you could probably only use it for things like this - mapping relfilenodes to oids/relnames for other DBs. Worth the effort? Probably not. But potentially fun. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: The pg_indent on on ftp is outdated

2017-12-28 Thread Craig Ringer
On 28 December 2017 at 23:59, Magnus Hagander <mag...@hagander.net> wrote: > > > On Fri, Dec 22, 2017 at 1:33 AM, Craig Ringer <cr...@2ndquadrant.com> > wrote: > >> >> >> On 21 Dec. 2017 22:42, "Tom Lane" <t...@sss.pgh.pa.us> wrote: &g

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-26 Thread Craig Ringer
On 22 December 2017 at 23:19, Maksim Milyutin <milyuti...@gmail.com> wrote: > On 22.12.2017 16:56, Craig Ringer wrote: > > On 22 December 2017 at 20:50, Maksim Milyutin <milyuti...@gmail.com> > wrote: > >> On 19.12.2017 16:54, Pavel Stehule wrote: >> &

Re: AS OF queries

2017-12-26 Thread Craig Ringer
On 25 December 2017 at 15:59, Konstantin Knizhnik <k.knizh...@postgrespro.ru > wrote: > > > On 25.12.2017 06:26, Craig Ringer wrote: > > On 24 December 2017 at 04:53, konstantin knizhnik < > k.knizh...@postgrespro.ru> wrote: > >> >> >> But

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2017-12-23 Thread Craig Ringer
lots, one for each DB. So there's lots of room for difficulty with unpredictable memory use. So the patch does two things. Firstly, it introduces logical_work_mem, a > GUC restricting memory consumed by all transactions currently kept in > the reorder buffer > Does this consider the (curr

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-22 Thread Craig Ringer
On 22 December 2017 at 20:50, Maksim Milyutin <milyuti...@gmail.com> wrote: > On 19.12.2017 16:54, Pavel Stehule wrote: > > Hi > > 2017-12-19 14:44 GMT+01:00 Craig Ringer <cr...@2ndquadrant.com>: > >> On 18 December 2017 at 10:05, Robert Haas <robertmh...@

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-21 Thread Craig Ringer
On 22 December 2017 at 13:05, Craig Ringer <cr...@2ndquadrant.com> wrote: > On 21 December 2017 at 15:55, Craig Ringer <cr...@2ndquadrant.com> wrote: > >> On 21 December 2017 at 15:24, Andres Freund <and...@anarazel.de> wrote: >> >>> Hi, >>>

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-21 Thread Craig Ringer
On 21 December 2017 at 15:55, Craig Ringer <cr...@2ndquadrant.com> wrote: > On 21 December 2017 at 15:24, Andres Freund <and...@anarazel.de> wrote: > >> Hi, >> >> On 2017-12-21 15:13:13 +0800, Craig Ringer wrote: >> > There tons of callers to enlarge

Re: Finalizing logical replication limitations as well as potential features

2017-12-21 Thread Craig Ringer
. It could possibly be worked around with some tricky key-range-based filtering of the applied change-stream if you were willing to require that no PK updates may occur, but it'd probably be bug city. It's hard enough to get sync correct at all. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-20 Thread Craig Ringer
On 21 December 2017 at 15:24, Andres Freund <and...@anarazel.de> wrote: > Hi, > > On 2017-12-21 15:13:13 +0800, Craig Ringer wrote: > > There tons of callers to enlargeStringInfo, so a 'noerror' parameter > would > > be viable. > > Not sure what you mean with

Re: != should give error?

2017-12-20 Thread Craig Ringer
Schema | Name | Left arg type | Right arg type | Result type | Function | Description +--+---++-+-+- pg_catalog | !| bigint | | numeric | numeric_fac | factorial (1 row) -- Craig R

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-20 Thread Craig Ringer
On 20 December 2017 at 08:46, Craig Ringer <cr...@2ndquadrant.com> wrote: > On 20 December 2017 at 02:35, Andres Freund <and...@anarazel.de> wrote: > > >> > Yeah. But please don't mess with MemoryContextStats per se --- >> > I dunno about you guys but &q

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-12-20 Thread Craig Ringer
of the horrible hacks they use today creating parse nodes by > > hand. > > Yeah, that would be likely possible. I am not volunteering for that in > the short term though.. > It sounds like that'd make some of ALTER TABLE a bit less ... upsetting ... too. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: AS OF queries

2017-12-20 Thread Craig Ringer
hout some rather > > enormous pushups. > > The SQL standard syntax appears to be something like > > "tablename" [ AS OF SYSTEM TIME 'something' ] [ [ AS ] "alias" ] > > That's not going to be fun to parse. Well, the SQL committe seem to specialise in parser

Re: access/parallel.h lacks PGDLLIMPORT

2017-12-19 Thread Craig Ringer
I pushed a commit adding PGDLLIMPORT to both > ParallelWorkerNumber and InitializingParallelWorker. > Especially since all non-static *functions* are exported unconditionally, so it's not like we set a high bar for public API. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-19 Thread Craig Ringer
d, which I thought would be more likely to get complaints than the global hook. I'm actually happier to do it with a passed callback. Will revise when I get a chance in the next couple of days. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-19 Thread Craig Ringer
On 18 December 2017 at 10:05, Robert Haas <robertmh...@gmail.com> wrote: > On Thu, Dec 14, 2017 at 9:34 PM, Craig Ringer <cr...@2ndquadrant.com> > wrote: > > On 15 December 2017 at 09:24, Greg Stark <st...@mit.edu> wrote: > >> Another simpler option wo

Re: genomic locus

2017-12-18 Thread Craig Ringer
ite so narrowly focused as genetics alone, then I could see adding it as a secondary type in the same extension. But it's more likely that the best course would be to extract the seg extension from core, rename it, hack it as desired, and build it as an extension maintained out-of-tree. -- Crai

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-14 Thread Craig Ringer
On 15 December 2017 at 09:24, Greg Stark <st...@mit.edu> wrote: > Another simpler option would be to open up a new file in the log > directory ... if we have one. We might be logging to syslog, or whatever else. I'd rather keep it simple(ish). -- Craig Ringer

Re: [HACKERS] Walsender timeouts and large transactions

2017-12-14 Thread Craig Ringer
On 15 December 2017 at 00:36, Andrew Dunstan <andrew.duns...@2ndquadrant.com > wrote: > > > On 12/14/2017 01:46 AM, Craig Ringer wrote: > > On 7 December 2017 at 01:22, Petr Jelinek > > <petr.jeli...@2ndquadrant.com <mailto:petr.jeli...@2ndquadrant.com>> &

Re: [HACKERS] Walsender timeouts and large transactions

2017-12-13 Thread Craig Ringer
ke the convention of if (big_condition && big_condition) one_linerdo_something; as awfully unreadable, but I guess code convention means you live with things you don't like. Anyway, I've just hit this bug in the wild for the umpteenth time this year, and I'd like to know wha

Re: proposal: alternative psql commands quit and exit

2017-12-12 Thread Craig Ringer
"WTF is this @#$@" and bail aren't necessarily the ones you want to lose; sometimes they're just busy or are evaluating a few things at once. Early UX matters. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: proposal: alternative psql commands quit and exit

2017-12-12 Thread Craig Ringer
d display is done wholly client-side and cannot be used in applications is absolutely horrid, and a real wart in the system. If we had the server-side functionality then some special case HINTs in error messages for common systems would be reasonable enough. Frankly that's probably a good idea anyway,

Re: proposal: alternative psql commands quit and exit

2017-12-11 Thread Craig Ringer
On 12 December 2017 at 13:58, Tom Lane <t...@sss.pgh.pa.us> wrote: > Craig Ringer <cr...@2ndquadrant.com> writes: > > I doubt I've ever written just "exit" or "quit" without indentation. I > > think if it requires them to be a bareword with no inden

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-11 Thread Craig Ringer
On 12 December 2017 at 12:43, Andres Freund <and...@anarazel.de> wrote: > Hi, > > On 2017-12-12 11:57:41 +0800, Craig Ringer wrote: > > TL;DR: Lets add a ProcSignalReason that makes a backend > > call MemoryContextStats when it sees it and a C func that users can us

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-11 Thread Craig Ringer
On 12 December 2017 at 12:25, Tsunakawa, Takayuki < tsunakawa.ta...@jp.fujitsu.com> wrote: > From: Craig Ringer [mailto:cr...@2ndquadrant.com] > > TL;DR: Lets add a ProcSignalReason that makes a backend call > > MemoryContextStats when it sees it and a C func that

Using ProcSignal to get memory context stats from a running backend

2017-12-11 Thread Craig Ringer
etc. You still have to go fishing for stderr to find the output, but that's usually the same place as the rest of the logs. Barring objections I'll send a patch in a while. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: proposal: alternative psql commands quit and exit

2017-12-11 Thread Craig Ringer
try control-D, but unless you've used unix a while that's not going to occur to you. I doubt I've ever written just "exit" or "quit" without indentation. I think if it requires them to be a bareword with no indentation, strictly ^(exit|quit)\n when isatty, then that's probab

Re: Testing Extension Upgrade Paths

2017-12-11 Thread Craig Ringer
.0.1 -> 1.1.0 upgrade path, but you still have the 1.0.0 -> 1.1.0 path. You can handle that with TAP if you're willing to write something to do the various combinations of steps and exercise them. It's not practical with pg_regress. More thorough testing benefits from an external harness. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Added PostgreSQL internals learning materials in Developer FAQ

2017-12-11 Thread Craig Ringer
who > want to learn about PostgreSQL especially internals. > > While we're talking wiki changes, some folks may be interested in the recent stuff I added to the profiling with perf page https://wiki.postgresql.org/wiki/Profiling_with_perf on using postgres's predefined tracepoints, injecting

<    1   2   3   4   5   6   >