Re: Global temporary tables

2019-08-09 Thread Craig Ringer
pressure on shared_buffers space, 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; -

Re: Add "password_protocol" connection parameter to libpq

2019-08-09 Thread Craig Ringer
I > SSPI > SuperStrongAuth, 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-12 Thread Craig Ringer
ough to have a useful opinion here. > I think that it not possible 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: Global temporary tables

2019-08-13 Thread Craig Ringer
. > Also I have attached updated version of the global temp tables with 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 crit

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: Configuring bgw_restart_time

2019-08-13 Thread Craig Ringer
y. If its exit code is 0 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-15 Thread Craig Ringer
change, which is fine, but I'd be interested in your thoughts on the question/issue in those cases. > -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Global temporary tables

2019-08-16 Thread Craig Ringer
arm) global 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
firstval settings. Why? + value[SEQ_COL_LASTVAL-1] = Int64GetDatumFast(1); /* start sequence with 1 */ Doesn't this change the test outcome for RELPERSISTENCE_UNLOGGED?: - else if (newrelpersistence == RELPERSISTENCE_PERMANENT) + else if (newrelpersistence != RELPERSISTENCE_TE

Re: The serial pseudotypes

2019-08-25 Thread Craig Ringer
ault chunk allocations from 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: Contributing with code

2017-12-31 Thread Craig Ringer
ey 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. -- 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
ones like check_postgres. These 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: BUGFIX: standby disconnect can corrupt serialized reorder buffers

2018-01-04 Thread Craig Ringer
d never unlock the replication slot used by the exiting > > > walsender. > > > > Ah, sorry I was wrong. WalSndErrorCleanup() didn't get called but > > ReplicationSlotRelease() got called. I agree that cleanup function > > gets called in ReplicationSlotRelease(). > > This patch is currently in 'Waiting on Author' state, but looks like it > should actually be in Needs Review (or perhaps Ready for Commmitter)..? > > Craig, would you agree with that and, if so, please update the status > accordingly. > > WoA looks correct, Petr suggested a tweak to how and when the cleanup is done that I need to adopt. I'm just about out of time before a trip, but I'll get a colleague to update it if I don't get the chance, so we can get it in and backpatched for this CF. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: pgbench - add \if support

2018-01-21 Thread Craig Ringer
minor rebase. > I'm a smidge worried about this. It seems like psql is growing a scripting language. Do we want to go our own way with a kind of organically grown scripting system? Or should we be looking at embedding client-side scripting in a more structured, formal way instead?

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

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

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
it 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_

Re: BUGFIX: standby disconnect can corrupt serialized reorder buffers

2018-01-21 Thread Craig Ringer
> 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 good cha

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

2018-01-22 Thread Craig Ringer
hy 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 you can't assume much about their behaviour and what must / must not be cleaned up. Nor can you just reset the state in a heavy handed manner like (say) plpgsql does. -- 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 someone help me get pointed 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

Redefining inet_net_ntop

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

Re: Redefining inet_net_ntop

2018-01-28 Thread Craig Ringer
quot; 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

Re: Redefining inet_net_ntop

2018-01-28 Thread Craig Ringer
On 29 January 2018 at 17:07, Tom Lane 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 Development, 24x7 Support, Training & Services

Linking PostgreSQL as a C++ program

2018-01-28 Thread Craig Ringer
extension, because I can just 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: Linking PostgreSQL as a C++ program

2018-01-28 Thread Craig Ringer
On 29 January 2018 at 18:02, Michael Paquier 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? More or less that: > > #ifdef

Re: JIT compiling with LLVM v9.1

2018-01-29 Thread Craig Ringer
++ compiler, but port.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 + /*

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

2018-02-02 Thread Craig Ringer
eally viable to pursue is if it's restricted to bind parameters. We only log those later and more selectively as it is, so it seems much more reasonable to say "I never want to appear in the logs". That said, I'm not sure it can be done at the function-interface lev

Re: Better Upgrades

2018-02-05 Thread Craig Ringer
e all sequences are fully synced over too. And if 2PC is in use, the cutover must be done during a period 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: Better Upgrades

2018-02-05 Thread Craig Ringer
g12 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

Re: PostgreSQL crashes with SIGSEGV

2018-02-06 Thread Craig Ringer
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: In logical replication concurrent update of partition key creates a duplicate record on standby.

2018-02-07 Thread Craig Ringer
tion locally in the tuple by setting > tp.t_data->t_ctid.ip_blkid to InvalidBlockNumber. > > We already do something similar for UPDATEs that change the REPLICA IDENTITY; we include the oldkey in extra WAL. The main question is whether the required knowledge is available at a suitabl

Re: Is there a cache consistent interface to tables ?

2018-02-09 Thread Craig Ringer
if there's a DB failure/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: Is there a cache consistent interface to tables ?

2018-02-10 Thread Craig Ringer
's about getting a change stream *out* of PostgreSQL to drive 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-11 Thread Craig Ringer
ping 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

Re: Parameter status message not sent?

2018-02-13 Thread Craig Ringer
Pending = 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

Allow cluster_name in log_line_prefix

2019-10-27 Thread Craig Ringer
_line_prefix. But then it gets 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: TRACE_SORT defined by default

2019-10-29 Thread Craig Ringer
, commit, rollback), 2pc, walsender activity, reorderbuffer, walreceiver, slots, global 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

Re: TRACE_SORT defined by default

2019-10-29 Thread Craig Ringer
u're 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 trac

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 commitfe

Re: [Patch proposal] libpq portal support

2019-11-07 Thread Craig Ringer
you can do there. It definitely won't fly without the docs and copy/paste reduction though. -- 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 argum

Handy describe_pg_lock function

2019-11-07 Thread Craig Ringer
ation, 0) WHERE l.locktype IN ('relation', 'extend', 'page', 'tuple') UNION ALL SELECT * FROM pg_identify_object(l.classid, l.objid, l.objsubid) WHERE l.locktype 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: tableam vs. TOAST

2019-11-10 Thread Craig Ringer
ht and that's exactly what 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

Re: Add a GUC variable that control logical replication

2019-11-10 Thread Craig Ringer
d've actually made more sense to use 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-on

Re: Allow superuser to grant passwordless connection rights on postgres_fdw

2019-11-10 Thread Craig Ringer
rt Kerberos/GSSAPI credential > 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: 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

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: [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: 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

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: [bug fix] Produce a crash dump before main() on Windows

2019-11-10 Thread Craig Ringer
because an error 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

Re: physical slot xmin dependency on logical slot?

2019-11-18 Thread Craig Ringer
hysical slot, then 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

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

2019-11-18 Thread Craig Ringer
/git.postgresql.org/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: checkpointer: PANIC: could not fsync file: No such file or directory

2019-11-21 Thread Craig Ringer
a relation path could be a valid argument is in 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 F

Re: ssl passphrase callback

2019-11-21 Thread Craig Ringer
to suggestions, but I want things to 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: Missing data_sync_elevel() for some calls of pg_fsync()?

2019-12-01 Thread Craig Ringer
hile performing our fsync() 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: Add a GUC variable that control logical replication

2019-12-01 Thread Craig Ringer
tReplicateId 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

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

2019-12-05 Thread Craig Ringer
e utility 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, e

Re: ssl passphrase callback

2019-12-08 Thread Craig Ringer
; like how to parse 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 th

Re: get_database_name() from background worker

2019-12-11 Thread Craig Ringer
larly, it might make 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: Session WAL activity

2019-12-11 Thread Craig Ringer
pe of this patch though. So personally 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-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.2

Re: xact_start for walsender & logical decoding not updated

2019-12-12 Thread Craig Ringer
ever be when 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: A varint implementation for PG?

2019-12-12 Thread Craig Ringer
undaries where the extra bit would push you up a variant size. 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: Questions about PostgreSQL implementation details

2019-12-12 Thread Craig Ringer
lar C 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

Re: Questions about PostgreSQL implementation details

2019-12-12 Thread Craig Ringer
KEY constraints, etc). All such management is done in C level logic with the assistance of the 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: Read Uncommitted

2019-12-19 Thread Craig Ringer
on, so you can semi-conveniently query it. (I don't think we have a way for 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: 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"

Re: Master Master replication

2020-01-19 Thread Craig Ringer
ut right now I think most contributors are focused elsewhere. -- 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
n strings that use them 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: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings

2020-01-20 Thread Craig Ringer
errors from OpenSSL that we pass on for example. Tricking 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: 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 slots

Re: Physical replication slot advance is not persistent

2020-01-20 Thread Craig Ringer
_changes() presently advances the slot position immediately, so if the client loses its connection before 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_sl

Re: pg13 PGDLLIMPORT list

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

Re: row filtering for logical replication

2020-01-20 Thread Craig Ringer
eat care is required with any operator or function that could raise an error in a row filter. But there are just so many often non-obvious ways you can land up with an ERROR being thrown that I think it's a bit of a user foot-gun. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Remove page-read callback from XLogReaderState.

2020-01-21 Thread Craig Ringer
ulous 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: 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 unle

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

2020-01-22 Thread Craig Ringer
ned > XA managers. Agreed. 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
stem's state. And if that's not enough I also 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-27 Thread Craig Ringer
uess it's all hot air unless I pony up a patch to show how I think it should work. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Re: Physical replication slot advance is not persistent

2020-01-28 Thread Craig Ringer
ded about the fact 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: Postgres, fsync, and OSs (specifically linux)

2018-10-18 Thread Craig Ringer
s sure it made 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: Early WIP/PoC for inlining CTEs

2018-11-18 Thread Craig Ringer
require that they not be inlined, let's not pick 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: Documenting PROVE_TESTS in section of TAP tests

2018-02-18 Thread Craig Ringer
l/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: [bug fix] Produce a crash dump before main() on Windows

2018-02-20 Thread Craig Ringer
lling Visual Studio Debugger 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: [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 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-21 Thread Craig Ringer
doesn't make 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: Translations contributions urgently needed

2018-02-22 Thread Craig Ringer
OT 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: Translations contributions urgently needed

2018-02-22 Thread Craig Ringer
mmendation 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://trans

Re: handling of heap rewrites in logical decoding

2018-02-25 Thread Craig Ringer
default to ignore/filter-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: Using JSONB directly from application

2018-02-26 Thread Craig Ringer
implementation friendly to frontend code would be frustrating, but maybe it's not as bad as I think. Certainly if you did such a thing, many people would thank you, because the inability to use ereport() and elog(), PG_TRY, the List API, etc, in FRONTEND code is a constant if minor s

Re: row filtering for logical replication

2018-02-28 Thread Craig Ringer
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 Ringe

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

2018-02-28 Thread Craig Ringer
y that might be the case, but so often it's somebody 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: RFC: Add 'taint' field to pg_control.

2018-02-28 Thread Craig Ringer
y writeback to do. A quick look at 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
and maybe 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: Online enabling of checksums

2018-02-28 Thread Craig Ringer
e 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: Two-phase update of restart_lsn in LogicalConfirmReceivedLocation

2018-02-28 Thread Craig Ringer
initely 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: [HACKERS] logical decoding of two-phase transactions

2018-03-01 Thread Craig Ringer
o 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. -- Craig Ringer

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

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

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

2018-03-02 Thread Craig Ringer
tput pattern files, for 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: [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 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 what must > > / must not be cle

<    1   2   3   4   5   6   >