Re: Do we need to handle orphaned prepared transactions in the server?

2020-01-29 Thread Craig Ringer
sense to generalise that for all xmin-retention). But I'm really not a fan of aborting such txns. If you operate with some kind of broken global transaction manager that can forget or abandon prepared xacts, then fix it, or adopt site-local periodic cleanup tasks that understand your site's needs. --

Re: Physical replication slot advance is not persistent

2020-01-28 Thread Craig Ringer
act that an advance is persistent > only at the follow-up checkpoint. And the tests are fixed to not use > a fake LSN but instead advance to the latest LSN position produced. > > Any objections? LGTM. Thankyou. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Do we need to handle orphaned prepared transactions in the server?

2020-01-27 Thread Craig Ringer
show how I think it should work. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Do we need to handle orphaned prepared transactions in the server?

2020-01-22 Thread Craig Ringer
lso want to write a decent bloat-checking view to include in the system views, since IMO lock-blocking, bloat, and resource retention are real monitoring pain points right now. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Do we need to handle orphaned prepared transactions in the server?

2020-01-22 Thread Craig Ringer
reed. Or use some bespoke script that does the cleanup that you think is appropriate for your particular environment and set of bugs. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Do we need to handle orphaned prepared transactions in the server?

2020-01-22 Thread Craig Ringer
On Wed, 22 Jan 2020 at 16:45, Ants Aasma wrote: > The intended use case of two phase transactions is ensuring atomic > durability of transactions across multiple database systems. Exactly. I was trying to find a good way to say this. It doesn't make much sense to embed a 2PC resolver in Pg

Re: Remove page-read callback from XLogReaderState.

2020-01-21 Thread Craig Ringer
ous regression tests to trigger some of these behaviours. I don't recall how many of them made it into the final patch to core but it's worth a look in the TAP test suite. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: pg13 PGDLLIMPORT list

2020-01-20 Thread Craig Ringer
ecisions based on what's actually replicated. Anyone object to exporting these? -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Physical replication slot advance is not persistent

2020-01-20 Thread Craig Ringer
efore reading and flushing all the data it may be unable to recover. And while pg_logical_slot_peek_changes() lets the app read the data w/o advancing the slot, it has to then do a separate pg_replication_slot_advance() which has to do the decoding work again. I'd like to improve that, but I didn't intend

Re: Physical replication slot advance is not persistent

2020-01-20 Thread Craig Ringer
On Fri, 17 Jan 2020 at 01:09, Alexey Kondratov wrote: > > > I think we shouldn't touch the paths used by replication protocol. And > > don't we focus on how we make a change of a replication slot from SQL > > interface persistent? It seems to me that generaly we don't need to > > save dirty

Re: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings

2020-01-20 Thread Craig Ringer
ricking Pg into reading from a fifo could be problematic too. I should've applied that restriction from the start, the same way as passwordless connections are restricted. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings

2020-01-19 Thread Craig Ringer
hem by non-superusers. So a superuser can define a user mapping that uses these options, but normal users may not. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Master Master replication

2020-01-19 Thread Craig Ringer
ributors are focused elsewhere. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Read Uncommitted

2019-12-19 Thread Craig Ringer
On Fri, 20 Dec 2019 at 12:18, Tom Lane wrote: > Craig Ringer writes: > > My understanding from reading the above is that Simon didn't propose to > > make aborted txns visible, only in-progress uncommitted txns. > > Yeah, but an "in-progress uncommitted txn" can b

Re: Read Uncommitted

2019-12-19 Thread Craig Ringer
a C callable function to supply a dynamic resultset type at plan-time to avoid the need for this, do we? Perhaps if we use a procedure not a function?) -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Questions about PostgreSQL implementation details

2019-12-12 Thread Craig Ringer
pg_depend catalog and the relationships it tracks. > Q2.1 If they are not implemented via data constraints on meta-description > tables, why ? > Same as above. > Q2.2 Is there somewhere in the documentation a list of such > "meta-constraints" implemented by PostgreSQL? > Not AFAIK. Why? -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Questions about PostgreSQL implementation details

2019-12-12 Thread Craig Ringer
symbol. > You can fall back on "grep -r" or "git grep", but lots of people use > ctags or etags or some other C-aware indexing tool. > > I strongly recommend cscope with editor integration for your preferred editor btw. -- Craig Ringer htt

Re: A varint implementation for PG?

2019-12-12 Thread Craig Ringer
e. Do others see use in this? Yes. Very, very much yes. I'd be quick to want to expose it to SQL too. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: xact_start for walsender & logical decoding not updated

2019-12-12 Thread Craig Ringer
using a historic snapshot. It's not interesting or relevant. Reporting the commit timestamp of the current or last-processed xact would likely just be fonfusing. I'd rather see that in pg_stat_replication if we're going to show it, that way we can label it usefully. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: get_database_name() from background worker

2019-12-12 Thread Craig Ringer
t; execute any sql orders . > > Yes, that's possible. It's not easy though and I strongly suggest you look into existing approaches like using dblink instead. Please start a new thread rather than following an unrelated existing one. -- Craig Ringer http://www.2ndQuadrant

Re: Session WAL activity

2019-12-11 Thread Craig Ringer
lly I'm OK with the new PGPROC field. Visibility into Pg's activity is woefully limited and something we need to prioritize more. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: get_database_name() from background worker

2019-12-11 Thread Craig Ringer
sense to assert that we have a valid snapshot in the SPI, which we don't presently do for read-only SPI calls. I recall that one biting me repeatedly when I was learning this stuff. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: ssl passphrase callback

2019-12-08 Thread Craig Ringer
out the sub-parts of the string, and the > quoting/escaping issues that will come along with that; while from > the user's perspective it replaces a simple and intellectually-coherent > variable definition with an unintelligible mess. > +1000 from me on that. -- Craig Ringer

[PATCH] print help from psql when user tries to run pg_restore, pg_dump etc

2019-12-05 Thread Craig Ringer
program not a psql command. See "help". psql-> Wording advice would be welcome. I'd be tempted to backpatch this, since it's one of the things I see users confused by most often now - right up there with pg_hba.conf issues, forgetting a semicolon in psql, etc. -- Craig Ring

Re: Add a GUC variable that control logical replication

2019-12-01 Thread Craig Ringer
Id to SQL or if that's not satisfactory, potentially replace that mechanism with the newly added one and emulate DoNotReplicateId for BC. I don't want two orthogonal ways to say "don't consider this for logical replication". -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Missing data_sync_elevel() for some calls of pg_fsync()?

2019-12-01 Thread Craig Ringer
ync() request, failed to flush, and complained about? I'm not confident I want to assume that. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: ssl passphrase callback

2019-11-21 Thread Craig Ringer
be tolerably clean. If someone wants a shell command wrapper, they can load a contrib that delegates the hook to a shell command. So we can just ship a contrib, which acts both as test coverage for the feature, and a shell-command-support wrapper for anyone who desires that. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: checkpointer: PANIC: could not fsync file: No such file or directory

2019-11-21 Thread Craig Ringer
rewriteheap.c in logical_end_heap_rewrite(). That calls the vfd layer's FileSync() and assumes that any failure is a fsync() syscall failure. But FileSync() can return failure if we fail to reopen the underlying file managed by the vfd too, per FileAccess(). Would there be a legitimate case where a

Re: PITR on DROP DATABASE, deleting of the database directory despite the recovery_target_time set before.

2019-11-18 Thread Craig Ringer
gitweb/?p=postgresql.git;a=blob;f=doc/src/sgml/config.sgml;h=f83770350eda5625179526300c652f23ff29c9fe;hb=HEAD#l3400> > > If this only happens when a DB is dropped under load with force, I lean toward just documenting it as a corner case. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: physical slot xmin dependency on logical slot?

2019-11-18 Thread Craig Ringer
n on pg10+ the catalog_xmin sent by the replica is stored as the catalog_xmin on the physical slot instead. Either way, if you have hot_standby_feedback enabled on a standby, that feedback includes the requirements of any replication slots on the standby. -- Craig Ringer http:/

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

2019-11-10 Thread Craig Ringer
r was encountered when loading required library "C:\Program Files\PostgreSQL\11\lib\libxml.dll": libxml.dll requires "liblz.dll" but it could not be found." Hint: not the last one. It'll at best complain about libxml.dll being missing, despite it being very obviously present.

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

2019-11-10 Thread Craig Ringer
On Wed, 18 Jul 2018 at 12:10, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > At Wed, 18 Jul 2018 11:12:06 +0800, Craig Ringer > wrote in yqtpidgg...@mail.gmail.com> > > On 26 February 2018 at 12:06, Tsunakawa, Takayuki < > > tsunakawa.ta...@jp.fuji

Re: Allow cluster_name in log_line_prefix

2019-11-10 Thread Craig Ringer
On Sun, 3 Nov 2019 at 07:22, Vik Fearing wrote: > On 31/10/2019 08:47, Fujii Masao wrote: > > On Mon, Oct 28, 2019 at 1:33 PM Craig Ringer > wrote: > >> Hi folks > >> > >> I was recently surprised to notice that log_line_prefix doesn't support > a clus

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

2019-11-10 Thread Craig Ringer
umns for the function, etc.? > > Okay, I have done an extra round of review, and committed it. Thanks very much. That'll make life easier when debugging corruptions. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: libpq sslpassword parameter and callback function

2019-11-10 Thread Craig Ringer
o fetch the sslpassword from the connection > >> parameters, in the same way that other settings can be fetched. > >> > >> > >> This is mostly the excellent work of my colleague Craig Ringer, with a > >> few embellishments from me. > >> > >>

Re: Handy describe_pg_lock function

2019-11-10 Thread Craig Ringer
On Sun, 10 Nov 2019 at 13:42, Tom Lane wrote: > Andres Freund writes: > > On 2019-11-08 14:49:25 +0800, Craig Ringer wrote: > >> I recently found the need to pretty-print the contents of pg_locks. So > >> here's a little helper to do it, for anyone else who happe

Re: Allow superuser to grant passwordless connection rights on postgres_fdw

2019-11-10 Thread Craig Ringer
t; forwarding / delegation, where a client willingly forwards to the PG > server a set of credentials which then allow the PG server to > authenticate as that user to another system (eg: through an FDW to > another PG server). > > Of course, as long as we're talking pie-in-the-sky ideas, I would > certainly be entirely for supporting both. ;) > > Thanks, > > Stephen > -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Add a GUC variable that control logical replication

2019-11-10 Thread Craig Ringer
e an xlinfo flag. Probably not worth changing now though. Be extremely careful though. If you're hiding things from logical replication you can get all sorts of confusing and exciting results. I very strongly suggest you make anything like this superuser-only. -- Craig Ringer http

Re: tableam vs. TOAST

2019-11-10 Thread Craig Ringer
t I mentioned in my conclusion too. > > In fact, I suspect this is PostgreSQL successfully protecting itself from an unsafe situation. Does the host have thin-provisioned storage? lvmthin, thin-provisioned SAN, etc? Is the DB on NFS? -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Handy describe_pg_lock function

2019-11-07 Thread Craig Ringer
NOT IN ('relation', 'extend', 'page', 'tuple') ) AS lo(lock_objtype, lock_objschema, lock_objname, lock_objidentity); $$; -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: TestLib::command_fails_like enhancement

2019-11-07 Thread Craig Ringer
On Fri, 8 Nov 2019 at 06:28, Mark Dilger wrote: > > > On 10/31/19 10:02 AM, Andrew Dunstan wrote: > > > > This small patch authored by my colleague Craig Ringer enhances > > Testlib's command_fails_like by allowing the passing of extra keyword > > type arguments.

Re: [Patch proposal] libpq portal support

2019-11-07 Thread Craig Ringer
nitely won't fly without the docs and copy/paste reduction though. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: [Patch proposal] libpq portal support

2019-11-07 Thread Craig Ringer
h the query results not in one batch but in a `paged` > way, the most convenient way is to use the portals feature of PosgreSQL > protocol. > > > Thanks. That's a really good reason. It'd also bring libpq closer to feature-parity with PgJDBC. Please add it to the commitfest app htt

Re: TRACE_SORT defined by default

2019-10-29 Thread Craig Ringer
worried about overheads of dtrace-style probes, you can (with systemtap ones like we use) generate a set of semaphores as a separate .so that you link into the final build. Then you can test for TRACE_POSTGRESQL_FOO_BAR_ENABLED() and only do any work required to generate input for the trace call if that

Re: TRACE_SORT defined by default

2019-10-29 Thread Craig Ringer
l xmin/catalog_xmin changes, writes, file flushes, buffer access, and lots more. (Pg's existing probes on transaction start and finish are almost totally useless as you can't tell if the txn then gets an xid allocated, whether the commit generates an xlog record or not, etc). -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Allow cluster_name in log_line_prefix

2019-10-27 Thread Craig Ringer
ets copied by pg_basebackup or whatever you're using to clone standbys etc, so you can easily land up with multiple instances reporting the same name. This rather defeats the purpose. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: [Patch proposal] libpq portal support

2019-10-18 Thread Craig Ringer
; If you are happy to put it under The PostgreSQL License, then sending it as an attachment here is the first step. If possible, please rebase it on top of git master. Some explanation for why you have this need and what problems this solves for you would be helpful as well. -- Craig Ringer

Re: [PATCH] Race condition in logical walsender causes long postgresql shutdown delay

2019-10-18 Thread Craig Ringer
it > > does :-) I would have liked confirmation from Craig that my change > > looks okay to him too, but maybe we'll have to go without that. > > There not being a third pair of eyes, I have pushed this. > > Thanks! > > > Thanks. I'm struggling to keep up with my own

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

2019-10-13 Thread Craig Ringer
ReorderBuffer. You can ignore this point or maybe > slightly adjust the comment to make it explicit. Does anyone object if we add the reorder buffer total size & in-memory size to struct WalSnd too, so we can report it in pg_stat_replication? I can follow up with a patch to add on top of thi

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

2019-10-10 Thread Craig Ringer
nough" approaches or methods that'd work with some client assistance / extension support / etc? -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Minimal logical decoding on standbys

2019-10-09 Thread Craig Ringer
IGNORE */ ... /* END_TESTIGNORE */ blocks for diagnostic output that we want available but don't want to be part of actual test output. Or filter out NOTICEs that vary in output. That sort of thing. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Sol

Re: Minimal logical decoding on standbys

2019-10-09 Thread Craig Ringer
On Sat, 6 Apr 2019 at 07:15, Andres Freund wrote: > Hi, > > Thanks for the new version of the patch. Btw, could you add Craig as a > co-author in the commit message of the next version of the patch? Don't > want to forget him. > That's kind, but OTOH you've picked it up and done most of the

Re: Shared memory

2019-10-09 Thread Craig Ringer
ktypes/methods/etc - More extensible pg_depend - Hooks in table rewrite -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: pg_init

2019-10-09 Thread Craig Ringer
nt databases; look at the archives. The gist is that you have to register a bgworker that attaches to shared memory and to a database (or use InvalidOid if you only want shared catalog access), then do your work from there. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant

Re: Transparent Data Encryption (TDE) and encrypted files

2019-10-09 Thread Craig Ringer
e most of the work is done by the driver. But I won't go into the design here since this thread appears to be about encryption at rest only, fully server-side. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: TCP Wrappers

2019-10-09 Thread Craig Ringer
0 and if you were lucky you had ipfwadm, tcp_wrappers made a lot of sense. Now it's IMO a pointless layer of additional complexity that no longer serves a purpose. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

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

2019-10-08 Thread Craig Ringer
earch_path changes might be for clients that want to cache name=>oid mappings for types, relations, etc. The JDBC driver would be able to benefit from that if it could trust that the same name would map to the same type (for a top-level statement) in future, but currently it can't. -- Crai

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

2019-10-08 Thread Craig Ringer
of SESSION AUTHORIZATION and ROLE is a huge pain point and it's far from the only one. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Regarding extension

2019-10-08 Thread Craig Ringer
alidations for, etc would just be amazing. But each would likely be a major effort to get into core, if we could get it accepted at all given the "in core users" argument, and we'd have to keep the old method around anyway...) -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: The serial pseudotypes

2019-08-25 Thread Craig Ringer
rom nextval so we can avoid dealing with these unpleasant assumptions about increment size... ... or worse, the apps that try to "fix" this by calling nextval then setval to jump the sequence to the value they think it should have next. And yes, I've seen this. In production code. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Global temporary tables

2019-08-16 Thread Craig Ringer
temp table with shared buffers becomes faster. Who would ever do that? I forget or do not notice some of your questions, would you be so kind as > to repeat them? > -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Global temporary tables

2019-08-16 Thread Craig Ringer
interested in your thoughts on the question/issue in those cases. > -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Configuring bgw_restart_time

2019-08-13 Thread Craig Ringer
it will not be restarted. You could also choose to have the worker exit with code 0 on SIGTERM, again causing itself to be unregistered and not restarted. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Global temporary tables

2019-08-13 Thread Craig Ringer
On Tue, 13 Aug 2019 at 16:19, Konstantin Knizhnik wrote: > > > On 13.08.2019 8:34, Craig Ringer wrote: > > On Tue, 13 Aug 2019 at 00:47, Pavel Stehule > wrote: > > >> But Postgres is not storing this information now anywhere else except >>> statistic,

Re: Global temporary tables

2019-08-13 Thread Craig Ringer
ith shared > buffers - global_shared_temp-1.patch > It is certainly larger (~2k lines vs. 1.5k lines) because it is changing > BufferTag and related functions. > But I do not think that this different is so critical. > Still have a wish to kill two birds with one stone:) > > > &

Re: Global temporary tables

2019-08-12 Thread Craig Ringer
e to assume that temporary data will aways fir >> in memory. >> So 1) seems to be not acceptable solution. >> > It'd only be the metadata, but if it includes things like column histograms and most frequent value data that'd still be undesirable to have pinned in backend memory. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Add "password_protocol" connection parameter to libpq

2019-08-09 Thread Craig Ringer
gAuth, it has to fall back to a disconnect and retry model like now. * Protocols that announce supported auth methods before any kind of trust is established make life easier for vulnerability scanners and worms and I'm sure there are more when it comes to auth handshakes. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Global temporary tables

2019-08-09 Thread Craig Ringer
cached pages for persistent tables all sessions are sharing; * the temp table data in shared_buffers may put pressure on shared_buffers space for dirty buffers, forcing writes of persistent tables out earlier therefore reducing write-combining opportunities; -- Craig Ringer

Re: Global temporary tables

2019-08-08 Thread Craig Ringer
On Thu, 8 Aug 2019 at 15:03, Konstantin Knizhnik wrote: > > > On 08.08.2019 5:40, Craig Ringer wrote: > > On Tue, 6 Aug 2019 at 16:32, Konstantin Knizhnik < > k.knizh...@postgrespro.ru> wrote: > >> New version of the patch with several fixes is attached

Re: POC: converting Lists into arrays

2019-08-08 Thread Craig Ringer
On Thu, 8 Aug 2019 at 12:18, Andres Freund wrote: > Hi, > > On 2019-08-08 11:36:44 +0800, Craig Ringer wrote: > > > you can only put one into the first element of a > > > for (;;). > > > > > > > Use an anonymous block outer scope? Or i

Re: Proposal for Signal Detection Refactoring

2019-08-07 Thread Craig Ringer
essage-id/CAMsr%2BYEuz4XwZX_QmnX_-2530XhyAmnK%3DzCmicEnq1vLr0aZ-g%40mail.gmail.com . -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: POC: converting Lists into arrays

2019-08-07 Thread Craig Ringer
arder to reason about. > > Totally agree. > > you can only put one into the first element of a > for (;;). > Use an anonymous block outer scope? Or if not permitted even by C99 (which I think it is), a do {...} while (0); hack? -- Craig Ringer http://www.2nd

Re: Global temporary tables

2019-08-07 Thread Craig Ringer
On Tue, 6 Aug 2019 at 16:32, Konstantin Knizhnik wrote: > New version of the patch with several fixes is attached. > Many thanks to Roman Zharkov for testing. > FWIW I still don't understand your argument with regards to using shared_buffers for temp tables having connection pooling benefits.

Re: Global temporary tables

2019-07-31 Thread Craig Ringer
d you can add it as a reloption later. You can't actually eliminate visibility checks anyway because they're still MVCC heaps. Savepoints can create invisible tuples even if you're using temp tables that are cleared on commit, and of course so can DELETEs or UPDATEs. So I'm not sure how much use it'd

Re: concerns around pg_lsn

2019-07-31 Thread Craig Ringer
that. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: tap tests driving the database via psql

2019-07-30 Thread Craig Ringer
On Wed, 31 Jul 2019 at 10:20, Andres Freund wrote: > Hi, > > On 2019-07-31 09:32:10 +0800, Craig Ringer wrote: > > OK. So rather than building our own $everything from scratch, lets look > at > > solving that. > > IDK, a minimal driver that just does what we ne

Re: tap tests driving the database via psql

2019-07-30 Thread Craig Ringer
On Tue, 30 Jul 2019 at 21:40, Tom Lane wrote: > Craig Ringer writes: > > On Sun, 28 Jul 2019 at 03:15, Andres Freund wrote: > >> 1) Just depend on DBD::Pg being installed. It's fairly common, after > >> all. It'd be somewhat annoying that we'd often end up usi

Re: tap tests driving the database via psql

2019-07-30 Thread Craig Ringer
s before too? > Right. But IIRC Tom vetoed it on grounds of not wanting to expect buildfarm operators to install it, something like that. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

[PATCH] Race condition in logical walsender causes long postgresql shutdown delay

2019-07-24 Thread Craig Ringer
ing during shutdown and Assert(...) then ERROR if it saw any WAL records that result in output plugin calls or snapshot management calls. I avoided this approach as it's more intrusive and I'm not confident I can concoct a reliable test to trigger it. -- Craig Ringer http://

Re: [BDR] Question on compatibility of Postgres with Open JDK

2019-01-30 Thread Craig Ringer
at I mean is I assume there is no > jdk/java dependency for Postgres server to work. Request your input. > Correct. Please see the PostgreSQL and PgJDBC manuals for more details. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: [BDR] Question on compatibility of Postgres with Open JDK

2019-01-29 Thread Craig Ringer
roups.google.com/a/2ndquadrant.com/d/msgid/bdr-list/CA%2BOir%3DMAc9OU4iNm%3DRBr%2BF2fLOSjJTACT9X5brChBGVCAJdPzA%40mail.gmail.com?utm_medium=email_source=footer> > . > -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Reviving the "Stopping logical replication protocol" patch from Vladimir Gordichuk

2019-01-13 Thread Craig Ringer
timeout now. What's the rationale there? You want to ensure that we reach ProcessRepliesIfAny() ? Can we cheaply test for a readable client socket then still take the fast-path if it's not readable? -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Early WIP/PoC for inlining CTEs

2018-11-18 Thread Craig Ringer
a method which > makes it ambiguous and makes us have to ask "do they really want this > limit/offset, or did they just want to make the CTE not be inlined...?" > > To satisfy Tom's understandable desire to let people write queries that behave the same on old and new versions, can we get away with back-patching the MATERIALIZED parser enhancement as a no-op in point releases? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Postgres, fsync, and OSs (specifically linux)

2018-10-18 Thread Craig Ringer
sense at the time, but I can't explain that decision now, and it looks like we should treat it as a failure. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Code of Conduct plan

2018-09-19 Thread Craig Ringer
se that while we don't want to restrain people from "calling out" egregious behaviour, going via the CoC team is often more likely to lead to constructive communication and positive change. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: Postgres, fsync, and OSs (specifically linux)

2018-08-29 Thread Craig Ringer
On 15 August 2018 at 07:32, Thomas Munro wrote: > On Wed, Aug 15, 2018 at 11:08 AM, Asim R P wrote: > > I was looking at the commitfest entry for feature > > (https://commitfest.postgresql.org/19/1639/) for the most recent list > > of patches to try out. The list doesn't look correct/complete.

Allow postgres_fdw passwordless non-superuser conns with prior superuser permission

2018-08-05 Thread Craig Ringer
ing the access. They can already GRANT mysuperuser TO public if they're feeling stupid; similarly, if they CREATE USER MAPPING FOR public SERVER localhost OPTIONS ('permit_passwordless', 'true', ...) ... then it's on them if they have 'peer' or 'ident' enabled on the server. -- Craig Rin

Re: Have an encrypted pgpass file

2018-07-23 Thread Craig Ringer
ess's memory is a bit harder than grabbing contents of a file, but not much harder. If the agent is remote then that's harder, but you can just ask the script to decrypt the pgpass for you, so again, not much of a win. Even with a hardware crypto offload device the advantage here seems t

Re: Missing pg_control crashes postmaster

2018-07-23 Thread Craig Ringer
On 24 July 2018 at 03:31, Brian Faherty wrote: > Hey Hackers, > > If a postmaster is running and the pg_control file is removed postgres > will PANIC. How does that happen? "Don't go deleting stuff in pgdata" is pretty fundamental.

Re: Background worker/idle sessions and caching

2018-07-18 Thread Craig Ringer
ome breakpoints or tracing through. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: untrusted PLs should be GRANTable

2018-07-18 Thread Craig Ringer
On 19 July 2018 at 08:23, Stephen Frost wrote: > Greetings, > > * Craig Ringer (cr...@2ndquadrant.com) wrote: > > Untrusted PLs should be GRANTable with a NOTICE or WARNING telling the > > admin that GRANTing an untrusted PL effectively gives the user the > ability &g

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

2018-07-18 Thread Craig Ringer
main() is > called. Anything is fine as long as a core dump is produced, right? > > When I was doing the original crashdump support I wrote a crashme extension that deliberately dereferenced a null pointer. You'd do something similar in the postmaster for the testing. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

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

2018-07-17 Thread Craig Ringer
On 26 February 2018 at 12:06, Tsunakawa, Takayuki < tsunakawa.ta...@jp.fujitsu.com> wrote: > From: Craig Ringer [mailto:cr...@2ndquadrant.com] > > The patch proposed here means that early crashes will invoke WER. If > we're > > going to allow WER we should probably ju

untrusted PLs should be GRANTable

2018-07-16 Thread Craig Ringer
PLs should be GRANTable with a NOTICE or WARNING telling the admin that GRANTing an untrusted PL effectively gives the user the ability to escape to superuser. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

bgworkers should share more of BackendRun / PostgresMain

2018-07-11 Thread Craig Ringer
r backends, the bgworker infrastructure, etc. I could just copy stuff from BackendRun / PostgresMain to StartBackgroundWorker() but I'm sure that's not the right approach. I think we need to decide what should be common and factor it out a bit. So discussion/ideas appreciated. -- Craig Ringer

Re: How can we submit code patches that implement our (pending) patents?

2018-07-11 Thread Craig Ringer
/wiki/Defensive_termination > > Thank you, his looks reasonable to give everyone the grant. Then, I > wonder if the community can accept patented code if the patent holder > grants this kind of license. Personally, I'd be in favour, but the core team has spoken here. I'm

Re: Usage of epoch in txid_current

2018-07-09 Thread Craig Ringer
On 10 July 2018 at 10:40, Andres Freund wrote: > On 2018-07-10 10:32:44 +0800, Craig Ringer wrote: > > On 10 July 2018 at 07:35, Thomas Munro > > wrote: > > > > > > > > I played around with this idea yesterday. Experiment-grade patch > > > atta

Re: Usage of epoch in txid_current

2018-07-09 Thread Craig Ringer
On 10 July 2018 at 10:32, Craig Ringer wrote: > > >> I think it's probably a good idea to make it very explicit when moving >> between big and small transaction IDs, hence the including of the word >> 'big' in variable and function names and the use of a function-li

Re: Usage of epoch in txid_current

2018-07-09 Thread Craig Ringer
do a sane job of code generation with this. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: How can we submit code patches that implement our (pending) patents?

2018-07-09 Thread Craig Ringer
nt grant is universal, not specific to PostgreSQL and derivatives. But if you start requiring "substantial" derivatives, etc, it gets messy and complicated. I'm not sure how grants with retaliation clauses would be received by others here. I lack the expertise to have much of an o

<    1   2   3   4   5   6   >