Re: [HACKERS] Stopping logical replication protocol

2016-09-25 Thread Craig Ringer
On 26 Sep. 2016 02:16, "Vladimir Gordiychuk" wrote: > > >It looks like you didn't import my updated patches, so I've rebased your new patches on top of them. > Yes, i forgot it, sorry. Thanks for you fixes. > > >I did't see you explain why this was removed: > > -/* fast path */ > -/* Try t

Re: [HACKERS] 9.6 TAP tests and extensions

2016-09-24 Thread Craig Ringer
On 24 Sep. 2016 04:04, "Tom Lane" wrote:. > > > > > It's thus sufficient to apply the patch to install the perl modules to > > 9.4, 9.5 and 9.6. Nothing else is needed. I've attached backports for > > 9.4 and 9.5. > > Pushed with cosmetic adjustments --- Thanks. > Looking back over the thread, I

Re: [HACKERS] patch: function xmltable

2016-09-23 Thread Craig Ringer
(TableExpr *) node; + +/* c_expr shoud be closed in brackets */ +appendStringInfoString(buf, "XMLTABLE("); I don't have the libxml knowledge or remaining brain to usefully evaluate the xpath and xml specifics in xpath.c today. It does strike me tha

Re: [HACKERS] File system operations.

2016-09-22 Thread Craig Ringer
much more sense to adopt an existing portable runtime (nspr, apr, whatever) than write our own if we wanted to go full framework. But I don't think we're likely to. Much more likely to cause pain than prevent it, esp since we're multiprocessing and shmem based. There are a few

Re: [HACKERS] Stopping logical replication protocol

2016-09-22 Thread Craig Ringer
tests to look for that message. An updated patch series is attached. Please re-test and review my changes. At that point I'll mark it ready to go unless someone else wants to take a look. I'm pretty much out of time for this anyway. -- Craig Ringer http://www.2ndQuadran

Re: [HACKERS] 9.6 TAP tests and extensions

2016-09-22 Thread Craig Ringer
On 23 September 2016 at 00:32, Tom Lane wrote: > Craig Ringer writes: >> On 13 September 2016 at 22:02, Tom Lane wrote: >>> Without taking a position on the merits of this patch per se, I'd like >>> to say that I find the argument for back-patching into 9.6 and

Re: [HACKERS] 9.6 TAP tests and extensions

2016-09-21 Thread Craig Ringer
On 13 September 2016 at 22:02, Tom Lane wrote: > Craig Ringer writes: >> While updating an extension for 9.6 I noticed that while the >> $(prove_check) definition is exposed for use by PGXS in >> Makefile.global, extensions can't actually use the TAP tests becau

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

2016-09-21 Thread Craig Ringer
Because slru.c doesn't release its LWLock on error we also need to ensure txid_status(...) is also only called from a toplevel xact so the user doesn't attempt to wrap it in plpgsql BEGIN ... EXCEPTION block and it causes the xact to abort. Will follow up with just that. -- Craig Ringer

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

2016-09-19 Thread Craig Ringer
On 16 September 2016 at 21:28, Robert Haas wrote: > On Thu, Sep 15, 2016 at 8:52 PM, Craig Ringer wrote: >> On 2 September 2016 at 23:29, Petr Jelinek wrote: >> >>> You could put it to txid.c where all the other txid stuff is in? >> >> Yeah, even though it

Re: [HACKERS] Stopping logical replication protocol

2016-09-15 Thread Craig Ringer
On 9 September 2016 at 12:03, Craig Ringer wrote: > Setting "waiting on author" in CF per discussion of the need for tests. Have you had a chance to look at adding the tests we discussed? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development,

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

2016-09-15 Thread Craig Ringer
again. We can move it and make it non-static if a need to do so comes up. Attached rebased patch updated and vs master. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services From 462a0ab51935b45d17820b83b8e9f6abd4ad2904 Mon Se

Re: [HACKERS] patch: function xmltable

2016-09-15 Thread Craig Ringer
ant a DEFAULT to be applied for empty tags. But that's something they can do in a post-process pass easily enough, since XMLTABLE is callable as a subquery / WITH expression / etc. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training

Re: [HACKERS] Logical Replication WIP

2016-09-14 Thread Craig Ringer
> you get corresponding error. Right, because we can rely on the server version = the logical replication version now. All good. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing lis

Re: [HACKERS] Event trigger and CREATE/ALTER ROLE/USER

2016-09-13 Thread Craig Ringer
On 14 Sep. 2016 9:44 am, "Alvaro Herrera" wrote: > > Tatsuo Ishii wrote: > > Simple question: Is there any reason for event trigger to not support > > CREATE/ALTER ROLE/USER? > > As I understand the issue, the main reason is that event triggers > execute procedures, and those exist in a single dat

Re: [HACKERS] 9.6 TAP tests and extensions

2016-09-13 Thread Craig Ringer
On 13 September 2016 at 14:36, Craig Ringer wrote: > > > prove_check: > rm -rf $(CURDIR)/tmp_check/log > cd $(srcdir) && TESTDIR='$(CURDIR)' PATH="$(shell pg_config > --bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' > top_

Re: [HACKERS] 9.6 TAP tests and extensions

2016-09-12 Thread Craig Ringer
On 13 September 2016 at 13:27, Craig Ringer wrote: > This was wrong for out-of-tree builds, updated. > > Still pending fix for PG_REGRESS path when invoked using > $(prove_check) from PGXS Looking further at this, I think a pgxs-specific patch to add support for prove tests and iso

Re: [HACKERS] 9.6 TAP tests and extensions

2016-09-12 Thread Craig Ringer
This was wrong for out-of-tree builds, updated. Still pending fix for PG_REGRESS path when invoked using $(prove_check) from PGXS -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

[HACKERS] 9.6 TAP tests and extensions

2016-09-12 Thread Craig Ringer
rove_check) won't be usable because it assumes a temp install in ./tmp_install but that's to be expected. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services From 1974ef1e771e28c39d5f6acb29c648e864b0f057 Mon Sep 17 00:0

[HACKERS] 9.6 TAP tests and extensions

2016-09-12 Thread Craig Ringer
-- 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] Logical Replication WIP

2016-09-12 Thread Craig Ringer
y "you requested this option I don't understand, go away" or "you asked for binary but I don't support that". -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mai

Re: [HACKERS]

2016-09-12 Thread Craig Ringer
ow we handle DEFAULT on a table, so I agree. It's a departure from what we do normally, but we didn't have table functions before either. -- 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] patch: function xmltable

2016-09-11 Thread Craig Ringer
cause parsing ambiguities, an a_expr ? There doesn't seem to be the same issue here as we have with BETWEEN etc. >> - Column definitions are underdocumented. The grammar says they can be >> NOT NULL, for example, but I don't see that in any of the references >> you mail

Re: [HACKERS] patch: function xmltable

2016-09-11 Thread Craig Ringer
ble(.) x ); in cases where that's what the user actually wants. There's no other case I can think of where expressions as arguments to set-returning functions are evaluated once per output row. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Sup

Re: [HACKERS] patch: function xmltable

2016-09-11 Thread Craig Ringer
a look and a better read of the code. Likely tomorrow, I've got work to do as well. -- 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] patch: function xmltable

2016-09-11 Thread Craig Ringer
On 12 September 2016 at 12:28, Craig Ringer wrote: >> I'll take a closer read-through shortly. >DEFAULT > isn't a normal literal, it's an xpath expression evaluated at the same > time as the rowexpression. Sorry for the spam, but turns out that's not the cas

Re: [HACKERS] patch: function xmltable

2016-09-11 Thread Craig Ringer
Please review my docs changes in the mean time. I'm spending a lot more time on this than I expected so I might have to get onto other things for a while too. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services Fr

Re: [HACKERS] patch: function xmltable

2016-09-11 Thread Craig Ringer
valTableExpr were anyway. Eventual committer will probably have opinions here. Mild nitpick: since you can have multiple namespaces, shouldn't builder->SetNS be builder->AddNS ? Added comments are helpful, thanks. On first read-through this is a big improvement and addresses all the conce

Re: [HACKERS] Override compile time log levels of specific messages/modules

2016-09-11 Thread Craig Ringer
On 11 Sep. 2016 11:31, "Jim Nasby" wrote: > Actually, I wish this was a straight-up logging level feature, because I need it all the time when debugging complicated user-level code. Specifically, I wish there was a GUC that would alter (client|log)_min_messages upon entering a specific function,

Re: [HACKERS] pg_basebackup, pg_receivexlog and data durability (was: silent data loss with ext4 / all current versions)

2016-09-10 Thread Craig Ringer
On 3 Sep. 2016 9:22 pm, "Michael Paquier" wrote: > > On Sat, Sep 3, 2016 at 12:42 AM, Magnus Hagander wrote: > > On Fri, Sep 2, 2016 at 8:50 AM, Michael Paquier < michael.paqu...@gmail.com> > > wrote: > >> On Fri, Sep 2, 2016 at 2:20 AM, Peter Eisentraut > >> wrote: > >> > On 5/13/16 2:39 AM, Mi

Re: [HACKERS] ICU integration

2016-09-09 Thread Craig Ringer
ing in a loud and obvious way is a *lot* better than silently returning > incorrect data... Yep, I strongly agree. That's part of why I think this is well worth doing even though it doesn't look like it'll give us a full solution for stable collations. It's likely al

Re: [HACKERS] Stopping logical replication protocol

2016-09-08 Thread Craig Ringer
On 9 September 2016 at 10:37, Craig Ringer wrote: > I'm looking at the revised patch now. Considerably improved. I fixed a typo from decondig to decoding that's throughout all the callback names. This test is wrong: +while ((change = ReorderBufferIterTXNNext(rb, iterst

Re: [HACKERS] Stopping logical replication protocol

2016-09-08 Thread Craig Ringer
any issues. I don't see any reason you'd need anything special for this test. If you think some of the code you add would be very reusable for other test modules in future, feel free to propose new methods for PostgresNode.pm . Ask if you're not sure. Ping me if you're stuck

Re: [HACKERS] ICU integration

2016-09-08 Thread Craig Ringer
erver package that'd be different. I can't really imagine that being acceptable for upstream development though. RH and Debian would instantly rip it out and replace it with their packaged ICU anyway. Pity ICU doesn't offer versioned collations within a single install. Though I can und

Re: [HACKERS] feature request: explain "with details" option

2016-09-08 Thread Craig Ringer
useful to many Postgres users. > > I'd even be willing to chip in a couple hundred bucks if it would help > grease the wheels for somebody taking up the challenge if that helps > at all :) I think you missed a zero or two, unfortunately. I don't think this is a small project

Re: [HACKERS] ICU integration

2016-09-08 Thread Craig Ringer
soname (which > changes with every major release). So this would avoid the situation > that a simple OS update could break collations. It also lets *users* and PostgreSQL-specific distributors bundle ICU and get stable collations. We can't exactly bundle glibc. -- Craig Ringer

Re: [HACKERS] Let file_fdw access COPY FROM PROGRAM

2016-09-08 Thread Craig Ringer
On 9 Sep. 2016 03:45, "Corey Huinker" wrote: > > > Stylistically, would a separate .pl file for the emitter be preferable to something inline like > >> perl -e 'print "a\tb\tcc\t4\n"; print "b\tc\tdd\t5\n"' I'd be fine with that and a suitable comment. Just be careful with different platforms' s

Re: [HACKERS] \timing interval

2016-09-08 Thread Craig Ringer
On 4 Sep. 2016 3:36 am, "Tom Lane" wrote: > > After further thought I concluded that not providing any labeling of > days is a bad idea. Yeah. I think labeling days is definitely good. I'm glad you changed that. Personally I'd like to trim milliseconds when dealing with minute+ long runs and se

Re: [HACKERS] High-CPU consumption on information_schema (only) query

2016-09-08 Thread Craig Ringer
On 8 Sep. 2016 7:38 am, "Robins Tharakan" wrote: > > Hi, > > An SQL (with only information_schema related JOINS) when triggered, runs with max CPU (and never ends - killed after 2 days). > - It runs similarly (very slow) on a replicated server that acts as a read-only slave. > - Top shows only pos

Re: [HACKERS] Stopping logical replication protocol

2016-09-08 Thread Craig Ringer
vlogival at a higher debug level and text search for a message you print from pg_recvlogical when it gets server CopyDone in the response to client CopyDone. I don't think a different pg_recvlogical numeric exit code could be justified for this. It sounds like more work than I think it woul

Re: [HACKERS] autonomous transactions

2016-09-08 Thread Craig Ringer
On 8 Sep. 2016 1:38 pm, "Andres Freund" wrote: > > I kind of dislike this approach for a different reason than already > mentioned in this thread: Namely it's not re-usable for implementing > streaming logical replication of large transaction, i.e. allow to decode > & apply un-committed changes.

Re: [HACKERS] autonomous transactions

2016-09-07 Thread Craig Ringer
On 8 September 2016 at 08:18, Tsunakawa, Takayuki wrote: > From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Craig Ringer >> Of course, if we could decrease the startup cost of a bgworker > >> For this use in autonomous tx

Re: [HACKERS] autonomous transactions

2016-09-07 Thread Craig Ringer
On 8 Sep. 2016 3:47 am, "Robert Haas" wrote: > > Of course, if we could decrease the startup cost of a bgworker For this use in autonomous tx's we could probably pool workers. Or at least lazily terminate them so that the loop cases work better by re-using an existing bgworker. I'm pretty sure

Re: [HACKERS] patch: function xmltable

2016-09-07 Thread Craig Ringer
he analogy with ColumnDef raw_default is perfect. Cool, lets just comment that then. I'll wait on an updated patch per discussion to date. Hopefully somebody else with more of a clue than me can offer better review of the executor/view/caching part you specifically called out as complex. Other

Re: [HACKERS] Let file_fdw access COPY FROM PROGRAM

2016-09-06 Thread Craig Ringer
On 7 September 2016 at 11:37, Corey Huinker wrote: > On Tue, Sep 6, 2016 at 11:24 PM, Craig Ringer > wrote: >> >> On 7 September 2016 at 11:21, Corey Huinker >> wrote: >> > On Tue, Sep 6, 2016 at 6:53 PM, Craig Ringer >> > >> >> > And t

Re: [HACKERS] Let file_fdw access COPY FROM PROGRAM

2016-09-06 Thread Craig Ringer
On 7 September 2016 at 11:21, Corey Huinker wrote: > On Tue, Sep 6, 2016 at 6:53 PM, Craig Ringer > And the TAP test would detect the operating system and know to create an FDW > that has the PROGRAM value 'cat test_data.csv' on Unix, 'type test_data.csv' > on wi

Re: [HACKERS] Suggestions for first contribution?

2016-09-06 Thread Craig Ringer
t they cover, but somewhat spotty. That said, who's volunteering? Nope nope nope! Though I am trying to blog about various subsystems occasionally. -- 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] patch: function xmltable

2016-09-06 Thread Craig Ringer
lis_not_null; >> +Node *path_expr; >> +Node *default_expr; >> + int location; >> +} TableExprRawCol; > > I am sorry. It is my fault. Now we have very similar node ColumnDef. This > node is designed for usage in utility comman

Re: [HACKERS] [PATCH] COPY vs \copy HINT

2016-09-06 Thread Craig Ringer
On 7 September 2016 at 04:19, Christoph Berg wrote: > I like your new version, it's crisp and transports the right message. OK, updated with Tom's tweaked version of Christoph's wording per discussion. Thanks all. -- Craig Ringer http://www.2ndQuadran

Re: [HACKERS] Let file_fdw access COPY FROM PROGRAM

2016-09-06 Thread Craig Ringer
On 7 Sep. 2016 02:14, "Corey Huinker" wrote: > > Having regression tests for this is extremely problematic, because the program invoked would need to be an invokable command on any architecture supported by postgres. I'm pretty sure no such command exists. Your best bet will be using the TAP fra

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

2016-09-06 Thread Craig Ringer
On 6 September 2016 at 16:10, Daniel Verite wrote: > Craig Ringer wrote: > >> Updated patch attached. > > Please find attached a couple fixes for typos I've came across in > the doc part. Thanks, will apply and post a rebased patch soon, or if someone picks thi

Re: [HACKERS] Override compile time log levels of specific messages/modules

2016-09-06 Thread Craig Ringer
On 6 Sep. 2016 17:57, "Pavan Deolasee" wrote: > > > > On Tue, Sep 6, 2016 at 3:06 PM, Craig Ringer wrote: >> >> >> I think it's worth looking at how Java handles logging. We can't achieve an exact parallel in C as we don't really have

Re: [HACKERS] Override compile time log levels of specific messages/modules

2016-09-06 Thread Craig Ringer
On 6 Sep. 2016 17:28, "Pavan Deolasee" wrote: > > > The patch uses some preprocessing and scripting magic to assign distinct identifiers to each module (a subdir in the source code), to each file and to each elog message. It then provides a set of functions by which an user can increase/decrease/

[HACKERS] Re: [COMMITTERS] pgsql: Add putenv support for msvcrt from Visual Studio 2013

2016-09-06 Thread Craig Ringer
On 6 Sep. 2016 15:12, "Michael Paquier" wrote: > > On Thu, Sep 1, 2016 at 4:03 PM, Christian Ullrich wrote: > > > That said, introducing this requirement would be a very significant change. > > I'm not sure how many independently maintained compiled extensions there > > are, but this would mean t

Re: [HACKERS] patch: function xmltable

2016-09-05 Thread Craig Ringer
t understand this at all: +/* + * There are different requests from XMLTABLE, JSON_TABLE functions + * on passed data than has CREATE TABLE command. It is reason for + * introduction special structure instead using ColumnDef. + */ +typedef struct TableExprRawCol +{ +NodeTag type; + char

Re: [HACKERS] [PATCH] COPY vs \copy HINT

2016-09-05 Thread Craig Ringer
ed by the server > process. (I'm not particularly happy that it says "server" in there > twice, but couldn't think of anything else.) Tom, any preference here? I'm probably inclined to go for your original wording and accept that it's just too hard to hint at

Re: [HACKERS] Stopping logical replication protocol

2016-09-05 Thread Craig Ringer
On 25 August 2016 at 13:04, Craig Ringer wrote: > By the way, I now think that the second part of your patch, to allow > interruption during ReorderBufferCommit processing, is also very > desirable. I've updated your patch, rebasing it on top of 10.0 master and splitting it into

[HACKERS] CF app and patch series

2016-09-05 Thread Craig Ringer
reating new CF entries that are immediately set to "committed" for each part that goes in. But neither seems ideal. Ideas? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mai

Re: [HACKERS] Logical decoding slots can go backwards when used from SQL, docs are wrong

2016-09-05 Thread Craig Ringer
tch, it just means there's no need to do anything extra when we add the cursor-like interface later in order to fully solve this. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-ha

Re: [HACKERS] [PATCH] Send catalog_xmin separately in hot standby feedback

2016-09-05 Thread Craig Ringer
On 5 September 2016 at 14:44, Craig Ringer wrote: > On 5 September 2016 at 12:40, Craig Ringer wrote: >> Hi all >> >> Currently hot standby feedback sends GetOldestXmin()'s result to the >> upstream as the required xmin. GetOldestXmin() returns a slot's >

Re: [HACKERS] [PATCH] Send catalog_xmin separately in hot standby feedback

2016-09-04 Thread Craig Ringer
On 5 September 2016 at 12:40, Craig Ringer wrote: > Hi all > > Currently hot standby feedback sends GetOldestXmin()'s result to the > upstream as the required xmin. GetOldestXmin() returns a slot's > catalog_xmin if that's the lowest xmin on the system. Note that

[HACKERS] [PATCH] Send catalog_xmin separately in hot standby feedback

2016-09-04 Thread Craig Ringer
t CF, but I realise the inability to test it standalone may mean it can only be committed as part of a series along with full support for logical decoding from standby. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services From

Re: [HACKERS] Logical decoding slots can go backwards when used from SQL, docs are wrong

2016-09-04 Thread Craig Ringer
On 5 September 2016 at 10:41, Craig Ringer wrote: > On 2 September 2016 at 17:49, Craig Ringer wrote: > >> So the main change becomes the one-liner in my prior mail. > > Per feedback from Simon, updated with a new test in src/test/recovery . ... attached this time.

Re: [HACKERS] Logical decoding slots can go backwards when used from SQL, docs are wrong

2016-09-04 Thread Craig Ringer
On 2 September 2016 at 17:49, Craig Ringer wrote: > So the main change becomes the one-liner in my prior mail. Per feedback from Simon, updated with a new test in src/test/recovery . If you revert the change to src/backend/replication/logical/logicalfuncs.c then the test will start fail

Re: [HACKERS] [PATCH] COPY vs \copy HINT

2016-09-04 Thread Craig Ringer
On 5 September 2016 at 09:05, Craig Ringer wrote: >I've attached an update that does so and > warns on EACCES too. ... this time, with required parens. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &

Re: [HACKERS] [PATCH] COPY vs \copy HINT

2016-09-04 Thread Craig Ringer
e facility such as psql's \\copy." and am inclined to suggest going ahead with the existing wording. I agree that removing the part for "relative path not allowed for COPY to file" is reasonable, so I've attached an update that does so and warns on EACCES too. -- Craig Ri

Re: [HACKERS] autonomous transactions

2016-09-03 Thread Craig Ringer
On 3 Sep. 2016 20:27, "Greg Stark" wrote: > > Well using a separate process also requires rewriting locking and > deadlock detection since a reasonable user might expect that second > process to have access to data locked in their current transaction. The user is going to hit some confusing iss

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

2016-09-02 Thread Craig Ringer
On 2 September 2016 at 21:01, Craig Ringer wrote: > On 2 September 2016 at 20:38, Craig Ringer wrote: >> On 2 Sep. 2016 8:30 pm, "Simon Riggs" wrote: >>> >>> On 2 September 2016 at 13:16, Craig Ringer wrote: >>> >>> > So I've mov

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

2016-09-02 Thread Craig Ringer
On 2 September 2016 at 20:38, Craig Ringer wrote: > On 2 Sep. 2016 8:30 pm, "Simon Riggs" wrote: >> >> On 2 September 2016 at 13:16, Craig Ringer wrote: >> >> > So I've moved it to xlog.c... >> >> I'm pretty sure it shouldn't l

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

2016-09-02 Thread Craig Ringer
On 2 Sep. 2016 8:30 pm, "Simon Riggs" wrote: > > On 2 September 2016 at 13:16, Craig Ringer wrote: > > > So I've moved it to xlog.c... > > I'm pretty sure it shouldn't live in xlog.c, but there may be some > good reason I can't see yet. Ug

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

2016-09-02 Thread Craig Ringer
. No other changes. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services From 4f7b79a94593004fb62b549cb9c04686e5b6ebb2 Mon Sep 17 00:00:00 2001 From: Craig Ringer Date: Fri, 19 Aug 2016 14:44:15 +0800 Subject: [PATCH 1/3] Introdu

Re: [HACKERS] What is the posix_memalign() equivalent for the PostgreSQL?

2016-09-02 Thread Craig Ringer
king with several > buffers that must be alive while the PostgreSQL Server is activated. You can't posix_memalign into TopMemoryContext. Such memory is outside the memory context system, like memory directly malloc()'d. -- Craig Ringer http://www.2ndQuadrant.com/ Pos

Re: [HACKERS] Logical decoding slots can go backwards when used from SQL, docs are wrong

2016-09-02 Thread Craig Ringer
nterface to keep track of the position they've consumed up to and specify it to subsequent START_REPLICATION calls. You can't do that on the SQL interface, which is why this change is needed there. Maybe the docs should be more explicit about the reason to specify start ls

Re: [HACKERS] [PATCH] COPY vs \copy HINT

2016-09-02 Thread Craig Ringer
On 2 September 2016 at 17:05, Christoph Berg wrote: > Re: Craig Ringer 2016-09-02 > >> I thought about that but figured it didn't really matter too much, >> when thinking about examples like >> >> # COPY batch_demo FROM '/root/secret.csv' WITH (FORMA

Re: [HACKERS] Logical decoding slots can go backwards when used from SQL, docs are wrong

2016-09-02 Thread Craig Ringer
tracking method that only causes a write at a clean shutdown or forced checkpoint - and maybe doesn't bother fsync()ing. That's a bit more invasive but would work for walsender use as well as the SQL interface. I don't think it's worth the bother, since in the end callers have to be

Re: [HACKERS] [PATCH] COPY vs \copy HINT

2016-09-01 Thread Craig Ringer
On 2 September 2016 at 04:28, Tom Lane wrote: > Craig Ringer writes: >> On 12 August 2016 at 16:34, Christoph Berg wrote: >>> Also, I vaguely get what you wanted to say with "a driver ... >>> wrapper", but it's pretty nonsensical if one doesn't kn

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

2016-08-31 Thread Craig Ringer
On 1 September 2016 at 13:08, Craig Ringer wrote: > On 29 August 2016 at 15:53, Craig Ringer wrote: > >> Said better approach attached in revised series. Thanks. > > Here's another minor update to the txid_status() and > txid_convert_if_recent() patches.

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

2016-08-31 Thread Craig Ringer
On 29 August 2016 at 15:53, Craig Ringer wrote: > Said better approach attached in revised series. Thanks. Here's another minor update to the txid_status() and txid_convert_if_recent() patches. The only change is moving get_xid_in_recent_past from src/backend/utils/adt/txid.c to src

[HACKERS] pg_recvlogical --endpos

2016-08-31 Thread Craig Ringer
gresql.org/message-id/CAMsr+YHBm3mUtXb2_RD=qsnupdt0dr8k-+gtbbgprdyuzfm...@mail.gmail.com -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services From 464e487e6235e1f86d06aa82a4a57716ff188579 Mon Sep 17 00:00:00 2001 From: Craig Ringer

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

2016-08-31 Thread Craig Ringer
id/20160503165812.GA29604@alvherre.pgsql -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services From 10d5f4652689fbcaf5b14fe6bd991c98dbf60e00 Mon Sep 17 00:00:00 2001 From: Craig Ringer Date: Thu, 1 Sep 2016 10:16:55 +0800 Subject: [PATCH

Re: [HACKERS] make async slave to wait for lsn to be replayed

2016-08-31 Thread Craig Ringer
read only queries on the master and expect fully consistent results). [1] https://www.postgresql.org/message-id/flat/53E41EC1.5050603%402ndquadrant.com#53e41ec1.5050...@2ndquadrant.com -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Ser

Re: [HACKERS] pg_sequence catalog

2016-08-31 Thread Craig Ringer
of a tuple. But that's what we do all the time with xmin/xmax etc, it's not really that different. It'd certainly make sequence decoding easier too. A LOT easier. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &

Re: [HACKERS] autonomous transactions

2016-08-31 Thread Craig Ringer
ct that everything xact-scoped hangs off, so we can pass it everywhere or swap it out of some global. The mechanical refactoring alone would be pretty scary, not to mention the complexity of actually identifying all the less obvious places that need changing. Consider invalidation callbacks.

Re: [HACKERS] pg_sequence catalog

2016-08-31 Thread Craig Ringer
s a little sucky. This change won't solve the problem I outlined in the other thread though, that sequences are transactional sometimes and not other times. So +1 for the idea from me. It'll just need relnotes warning of the subtle behaviour change. -- Craig Ringer http://

Re: [HACKERS] ICU integration

2016-08-30 Thread Craig Ringer
us and unbundle it then complain about it. Not wholly without reason either; they don't want to push security updates and bug fixes for bundled libraries. Also, ICU isn't exactly a pocket-sized library we can stash in some 3rdpty_libs/ dir . -- Craig Ringer http://www.

Re: [HACKERS] Logical decoding restart problems

2016-08-30 Thread Craig Ringer
On 25 Aug. 2016 20:03, "Stas Kelvich" wrote: > > > On 20 Aug 2016, at 15:59, Craig Ringer wrote: > > > > I'll wait for a test case or some more detail. > > Thanks for clarification about how restart_lsn is working. > > Digging slightly deeper

Re: [HACKERS] [PATCH] Send numeric version to clients

2016-08-29 Thread Craig Ringer
l to spend our time on. -- 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] [PATCH] Send numeric version to clients

2016-08-29 Thread Craig Ringer
On 30 Aug 2016 9:07 AM, "Dave Cramer" wrote: > > > On 29 August 2016 at 15:42, Tom Lane wrote: >> >> Kevin Grittner writes: >> > Regarding Java, for anything above the driver itself the >> > JDBC API says the DatabaseMetaData class must implement these >> > methods: >> > ... >> > That *should* m

Re: [HACKERS] Renaming of pg_xlog and pg_clog

2016-08-29 Thread Craig Ringer
On 29 August 2016 at 20:28, Michael Paquier wrote: > On Mon, Aug 29, 2016 at 5:28 PM, Craig Ringer > wrote: >> On 29 August 2016 at 14:30, Michael Paquier >> wrote: >>> On Mon, Aug 29, 2016 at 2:36 PM, Craig Ringer >>> wrote: >>>> I don't

[HACKERS] [PATCH] Send numeric version to clients

2016-08-29 Thread Craig Ringer
9190$e8e2b4b0$@pcorp.us [2] https://www.postgresql.org/message-id/1585.1472410...@sss.pgh.pa.us [3] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=e35ea51 [4] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=df7641e2 [5] https://git.postgresql.org/gitweb/?p=p

Re: [HACKERS] PostgreSQL Version 10, missing minor version

2016-08-29 Thread Craig Ringer
On 29 August 2016 at 11:46, Andres Freund wrote: > On 2016-08-29 11:41:00 +0800, Craig Ringer wrote: >> On 29 August 2016 at 02:52, Tom Lane wrote: >> > "Regina Obe" writes: >> >> The routine in PostGIS to parse out the version number from pg_

Re: [HACKERS] Renaming of pg_xlog and pg_clog

2016-08-29 Thread Craig Ringer
On 29 August 2016 at 14:30, Michael Paquier wrote: > On Mon, Aug 29, 2016 at 2:36 PM, Craig Ringer > wrote: >> I don't care if it comes as part of some greater reorg or not but I'll be >> really annoyed if scope creep lands up killing the original proposal to just &

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

2016-08-29 Thread Craig Ringer
On 29 August 2016 at 11:45, Andres Freund wrote: > Hi, > > On 2016-08-29 11:25:39 +0800, Craig Ringer wrote: >> ERROR: could not access status of transaction 778793573 >> DETAIL: could not open file "pg_clog/02E6": No such file or directory >> >>

Re: [HACKERS] Renaming of pg_xlog and pg_clog

2016-08-28 Thread Craig Ringer
On 29 Aug 2016 12:10 PM, "Jim Nasby" wrote: > > On 8/26/16 4:08 PM, Andres Freund wrote: >> >> Splitting of ephemeral data seems to have a benefit, the rest seems more >> like rather noisy busywork to me. > > > People accidentally blowing away pg_clog or pg_xlog is a pretty common occurrence, and

Re: [HACKERS] PostgreSQL Version 10, missing minor version

2016-08-28 Thread Craig Ringer
tring, despite it not being the most reliable source of information, because we don't send server_version_num ;) Patch attached. Yes, I know PostGIS doesn't use it, but it makes no sense to tell people not to parse the server version out in some situations then force them to in

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

2016-08-28 Thread Craig Ringer
On 24 August 2016 at 03:10, Robert Haas wrote: > > On Tue, Aug 23, 2016 at 12:59 PM, Craig Ringer wrote: > > Also fine by me. You're right, keep it simple. It means the potential set of > > values isn't discoverable the same way, but ... meh. Using it usefully means

Re: [HACKERS] Stopping logical replication protocol

2016-08-24 Thread Craig Ringer
On 25 August 2016 at 09:22, Craig Ringer wrote: > On 25 August 2016 at 03:26, Vladimir Gordiychuk wrote: >> Hi. It has already passed a few months but patch still have required review >> state. Can I help to speed up the review, or should i wait commitfest? >> I plane compl

Re: [HACKERS] How to do failover in pglogical replication?

2016-08-24 Thread Craig Ringer
s mailing list. We're adding a pglogical mailing list now that it's clear it's not going into core, but in the mean time feel free to raise this on the github tracker for the project. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, T

Re: [HACKERS] Stopping logical replication protocol

2016-08-24 Thread Craig Ringer
and test the updated patch. I'll mark it ready to go if you are. It's linked to at https://commitfest.postgresql.org/10/621/ . -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers maili

Re: [HACKERS] Logical decoding of sequence advances, part II

2016-08-23 Thread Craig Ringer
problem > for logical rep, as long as hot-standby, and crash-recovery in general, > also has this problem... > Same here, as commented upthread. I think it'd be cool to be able to deliver SSI-alike behaviour on a standby, but it's far from a priority, and it applies to phy

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

2016-08-23 Thread Craig Ringer
On 23 August 2016 at 22:18, Robert Haas wrote: > On Mon, Aug 22, 2016 at 8:55 PM, Craig Ringer > wrote: > > Updated patch series attached. As before, 0-4 intended for commit, 5 just > > because it'll be handy to have around for people doing wraparound related > > t

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