Re: [GENERAL] PG-10 + ICU and abbreviated keys

2017-11-13 Thread Peter Geoghegan
'll help with that, even though the leading column might be low cardinality. -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] PG-10 + ICU and abbreviated keys

2017-11-13 Thread Peter Geoghegan
hing in particular gets faster, because there are many performance enhancements added to a release. -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] PG-10 + ICU and abbreviated keys

2017-11-13 Thread Peter Geoghegan
On Mon, Nov 13, 2017 at 12:40 PM, Peter Geoghegan wrote: >> Do I have to explicitly specify collation when using ORDER by on that column >> for index and abbreviated keys to be used? > > Only if you didn't define the column with a per-column collation initially. BTW, if y

Re: [GENERAL] PG-10 + ICU and abbreviated keys

2017-11-13 Thread Peter Geoghegan
specify collation when using ORDER by on that column > for index and abbreviated keys to be used? Only if you didn't define the column with a per-column collation initially. -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] PG-10 + ICU and abbreviated keys

2017-11-13 Thread Peter Geoghegan
antage of abbreviated keys? You need to use an ICU collation. It must be a per-column collation, as you cannot currently use ICU for an entire database. (This limitation should be removed in the next release or two.) -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsq

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-12 Thread Peter J. Holzer
QL is really up and services which don't need PostgreSQL (e.g. SSH or X11 login or a web- or mail server) shouldn't depend on it. One of the purported advantages of systemd over SystemV init is that it starts up services in parallel, so a service which takes a long (or infinite) time to st

Re: [GENERAL] Client Authentication methods

2017-11-10 Thread Peter J. Holzer
or What exactly it make the difference for > client > if i use md5/password  in pg_hba.conf file in DB server?. See https://www.postgresql.org/docs/10/static/auth-methods.html#AUTH-PASSWORD With method password, passwords are sent in plain text. With md5, an md5 hash of the password, th

Re: [GENERAL] Naming conventions for column names

2017-11-06 Thread Peter Eisentraut
naming pattern used in the system catalogs: 3 letters indicating the catalog, plus additional letters or words. It is useful to use the same name in views such as pg_stat_replication, so you can easily join different views and catalogs. -- Peter Eisentraut http://www.2ndQuadrant.com/ Post

Re: [GENERAL] Postgres 10 manual breaks links with anchors

2017-11-03 Thread Peter Eisentraut
https://www.postgresql.org/docs/9.5/static/sql-createindex.html#SQL-CREATEINDEX-CONCURRENTLY A fix for this has been committed. Once 10.1 comes out (next week), the old-style anchors will work again. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Su

Re: [GENERAL] EXPLAIN command just hangs...

2017-11-03 Thread Peter J. Holzer
ps with timezones, which isn't the case for PostgreSQL.) hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticated | | | h...@hjp.at | management tools. __/ | http://www.hjp.at/ | --

Re: [GENERAL] Monitoring of a hot standby with a largely idle master

2017-11-01 Thread Peter Eisentraut
suggest. > > > new version looks good. committed I changed to links to xrefs, which automatically generated the correct target texts. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via

[GENERAL] Query plan for Merge Semi Join

2017-11-01 Thread Peter J. Holzer
ndom accesses, most of which are unneccessary. The materialize returns 184791 rows. This one I understand: There are 6 non-null distinct values of arbeitsvolumen in facttable_kon_eh, and each appears 36958 times. 36958 * 5 + 1 = 184791. So it stops once it reaches the largest value. Although now

Re: [GENERAL] gin index trouble

2017-10-30 Thread Peter Geoghegan
On Mon, Oct 30, 2017 at 9:45 AM, Rob Sargent wrote: > Peter, you beat me to the punch. I was just about to say "Having read the > referenced message I thought I would add that we never delete from this > table." In this particular case it was written to record by reco

Re: [GENERAL] gin index trouble

2017-10-30 Thread Peter Geoghegan
ndex, but will that help? > Is there a way to see what the ‘different type’ is? > Is it caught/clean-up by vacuum analyse or some such? Is there a lot of churn on this table? Do you either heavily update or heavily delete rows in the table? Does vacuum tend to run on the table rather fr

Re: [GENERAL] gin index trouble

2017-10-30 Thread Peter Geoghegan
cient, and that we now continue to see the same mix of symptoms for what is essentially the same bug. [1] https://postgr.es/m/CAH2-WzmtLXbs8+c19t1T=rj0kyp7vk9q8hqjulgdldvmuee...@mail.gmail.com -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chan

Re: [GENERAL] Making subscribers read only in Postgres 10 logical replication

2017-10-26 Thread Peter Eisentraut
through exactly how to present this in the user interface. Another longer-term solution here is to implement conflict resolution mechanisms. So if you don't like local updates to break the incoming replication stream, a remote-update-wins policy would help. -- Peter Eisentrau

[GENERAL] Create database from template and include comment

2017-10-24 Thread Peter Devoy
pg_database WHERE datname LIKE 'test_comment%'; oid |datname| shobj_description +---+--- 828611 | test_comment_template | hello world 828612 | test_comment | DROP DATABASE test_comment; DROP DATABASE test_comment_template; Kind regards Peter

Re: [GENERAL] table corruption

2017-10-23 Thread Peter Geoghegan
e most important check here. -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] table corruption

2017-10-23 Thread Peter Geoghegan
On Mon, Oct 23, 2017 at 7:44 AM, Peter Hunčár wrote: > I know that zero_damaged_pages and vacuum (or restore the table from backup) > will help, but I want to ask if there is a way to identify affected > rows/datafiles, so we can 'fix' only the affected data using the &

[GENERAL] table corruption

2017-10-23 Thread Peter Hunčár
Hi, we have a table with around 1.6 billion rows having quite lot of big binary data toasted. Today we started getting: WIB > ERROR: invalid page in block 1288868309 of relation base/96031/96201 Which is a toast reltype. I know that zero_damaged_pages and vacuum (or restore the table from back

Re: [GENERAL] could not fdatasync log file: Input/output error

2017-10-17 Thread Peter Geoghegan
On Tue, Oct 17, 2017 at 7:13 PM, Michael Paquier wrote: > Note that Peter has also worked on provising Debian packages for the > utility down to 9.4 if I recall correctly, which is nice, but if you > want the heap checks you will need to compile things by youself. We > are currently

Re: [GENERAL] "Shared strings"-style table

2017-10-13 Thread Peter J. Holzer
software maintainability POV I think a dictionary lookup in Perl is a lot nicer than 50 joins (or 300 in your case). hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticated | | | h...@hjp.at | m

Re: [GENERAL] Merge - Insert Select

2017-10-13 Thread Peter Geoghegan
nstead of VALUES with ON CONFLICT DO NOTHING/ON CONFLICT DO UPDATE. They don't impose any restriction on the INSERT statement at all, unlike MERGE, which is fussy about the use of subqueries. -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make c

Re: [GENERAL] startup process stuck in recovery

2017-10-09 Thread Peter Geoghegan
On Mon, Oct 9, 2017 at 12:08 PM, Christophe Pettus wrote: > Suggestions on further diagnosis? What's the hot_standy_feedback setting? How about max_standby_archive_delay/max_standby_streaming_delay? -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql

Re: [GENERAL] startup process stuck in recovery

2017-10-09 Thread Peter Geoghegan
s much CPU as the master's backend. > > What am I missing to reproduce the problem? Just a guess, but do you disable autovacuum on your dev machine? (I know I do.) It's possible that this is relevant: https://postgr.es/m/CAB-EU3RawZx8-OzMfvswFf6z+Y7GOZf03TZ=bez+pbqx+a4...@ma

[GENERAL] hard parse?

2017-09-21 Thread Peter Koukoulis
Hi I have a query where a filter would always be negative, how many steps, out these: - parsing and syntax check - semantic analysis - transformation process (query rewrite based on system or user-defined rules) - query optimization - execution would be performed or not? Also,

[GENERAL] random row from a subset

2017-09-19 Thread Peter Koukoulis
I'm attempting to get a random, based on a range that spans 1 to the maximum number of rows that for a subset. I run the query in Oracle sucessfully and get a different number each time and only a single number, which is what I am expecting, but when I run the same query, albeit the random functio

[GENERAL] cursor declare

2017-09-15 Thread Peter Koukoulis
Hi This is my first cursor attempt: according to docs DECLARE curs1 refcursor; curs2 CURSOR FOR SELECT * FROM tenk1; curs3 CURSOR (key integer) FOR SELECT * FROM tenk1 WHERE unique1 = key; this should work, but getting error: ft_node=# declare cur_test1 CURSOR (key integer) for sel

[GENERAL] equivalent for md5, clobs and varchar2 list

2017-09-13 Thread Peter Koukoulis
Hi is there an equivalent of a odcivarchar2list in PostgreSQL. I'm running the code in Oracle 11gr2. I know that the equivalent of dbms_crypto. hash( " " ,2) is md5(), but I cannot find anything similar to odcivarchar2list? I am constrained by not being able to declare types in the database. I a

Re: [GENERAL] pglogical bidirectional replication of sequences

2017-09-01 Thread Peter J. Holzer
On 2017-09-01 10:29:51 +0200, Peter J. Holzer wrote: > pglogical supports replication of sequences, and although the way it > does this suggests that it can't really work in both directions > (actually I'm sceptical that it works reliably in one direction), of > course I ha

Re: [GENERAL] pglogical bidirectional replication of sequences

2017-09-01 Thread Peter J. Holzer
On 2017-09-01 09:57:52 -0600, Rob Sargent wrote: > On 09/01/2017 02:29 AM, Peter J. Holzer wrote: > >TLDR: Don't. > > > >I'm currently conducting tests which should eventually lead to a 2 node > >cluster with working bidirectional logical replication. > >

[GENERAL] pglogical bidirectional replication of sequences

2017-09-01 Thread Peter J. Holzer
y to recover from this situation without drastic measures like nuking the whole database. hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticated | | | h...@hjp.at | management t

Re: [GENERAL] hrs, mins and seconds do not appear with to_char

2017-08-27 Thread Peter Koukoulis
thanks. didn't realise they were different. I discovered the difference when using a MD5 comparison between the 2 databases in a C++ utility. All values were matching apart from dates. Cheers P On Sun, 27 Aug 2017 at 21:35 Tom Lane wrote: > Peter Koukoulis writes: > > I am un

[GENERAL] hrs, mins and seconds do not appear with to_char

2017-08-27 Thread Peter Koukoulis
Hi I am unsure as to why the hrs, mins and seconds do not appear for a date column. I am using PostgreSQL 9.6.3 on Linux. When performing the exact same queries in Oracle, I get the full date formatted to "mmddhh24miss", but cannot get the same for PostgreSQL, for example: ft_node=# create ta

Re: [GENERAL] Get user defined type OID (PostgreSQL extension in C)

2017-08-25 Thread Peter Eisentraut
e OIDs of all the types involved don't change, and you can use the standard functions to look up the types of your arguments and the associated array types. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --

Re: [GENERAL] Invalid magic number 0000 in log file

2017-08-25 Thread Peter Eisentraut
> > If it's  applicable, is it still valid or too many things have changed? That doesn't seem related. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-general mail

Re: [GENERAL] Porting libpq to QNX 4.25

2017-08-25 Thread Peter J. Holzer
On 2017-08-22 12:57:15 -0300, marcelo wrote: > We'll replace those QNX machines with WIndows XP ones The future is already here — it's just not very evenly distributed. SCNR, hp -- _ | Peter J. Holzer| we build much bigger, better

Re: [GENERAL] Multixact members limit exceeded

2017-08-24 Thread Peter Hunčár
of those 110TB ;) Thanks a lot for the help! Peter

[GENERAL] install the oracle data wrapper extension

2017-08-22 Thread Peter Koukoulis
Hi Is there a reliable way to create a database link from PosgreSQL 9.6 to Oracle 11g? I am running 9.6 on Linux 64 bit. I can connect to the Oracle database with sqlplus from the PostgreSQL server. Also, I have in attempted to install the oracle_fdw wrapper as an alternatve, but I keep getting

Re: [GENERAL] Count column with name 'count' returns multiple rows. Why?

2017-08-19 Thread Peter J. Holzer
On 2017-08-18 15:57:39 -0500, Justin Pryzby wrote: > On Fri, Aug 18, 2017 at 10:47:37PM +0200, Peter J. Holzer wrote: > > On 2017-08-18 06:37:15 -0500, Justin Pryzby wrote: > > > On Fri, Aug 18, 2017 at 01:01:45PM +0200, Rob Audenaerde wrote: > > > > Can anyone

Re: [GENERAL] Count column with name 'count' returns multiple rows. Why?

2017-08-18 Thread Peter J. Holzer
recognized as a function. So apparently columnname open-parenthesis tablename closed-parenthesis is a specific syntactic construct, but I can't find it documented anywhere. hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) |

Re: [GENERAL] Corrupt index

2017-08-15 Thread Peter Geoghegan
e a pattern > related to application business processes but we are at a loss as to how > this could happen. You've given no details at all. What business pattern? What does the index and table look like? -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@post

Re: [GENERAL] Adding a new Clause in the Source Code

2017-08-14 Thread Peter Eisentraut
track all those places down and then see whether I need to make analogous changes there. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-general mailing list (pgsql-general@postgresql.o

Re: [GENERAL] Fwd: 2 process postgres -D for one instance

2017-08-11 Thread Peter Eisentraut
39922 17769 0 15:39 ?00:00:00 > /usr/pgsql-9.3/bin/postgres -D /bases/postgresql/scl/data -i -p 5450 -h > bd-sillage.info. It appears that the second one is a process forked off from the first one. That looks normal to me. -- Peter Eisentraut http://www.2ndQuadrant.

Re: [GENERAL] Multixact members limit exceeded

2017-08-09 Thread Peter Hunčár
documentation, it's limited silently to half of autovacuum_multixact_freeze_max_age. So I guess I have to get those 400M to much lower number? Thank you very much Peter On Wed, Aug 9, 2017 at 10:39 PM Andres Freund wrote: > Hi, > > On 2017-08-09 16:30:03 -0400, Alvaro Herrera wrote: > >

Re: [GENERAL] Multixact members limit exceeded

2017-08-09 Thread Peter Hunčár
d changed after vacuum full, or am I not understanding something? Thanks a lot On Wed, Aug 9, 2017 at 7:57 PM Andres Freund wrote: > Hi, > > On 2017-08-09 10:06:48 +, Peter Hunčár wrote: > > We started feeding it several weeks ago and everything went smoothly > until > >

[GENERAL] Multixact members limit exceeded

2017-08-09 Thread Peter Hunčár
nt:16777216 Maximum length of identifiers:64 Maximum columns in an index: 32 Maximum size of a TOAST chunk:1996 Size of a large-object chunk: 2048 Date/time type storage: 64-bit integers Float4 argument passing: by value Float8 argument passing: by value Data page checksum version: 0 Thank you Peter Huncar

Re: [GENERAL] Compiling libpq only on Linux

2017-08-08 Thread Peter Eisentraut
ed distribution packages, even if they are not directly from your vendor. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes t

Re: [GENERAL] select md5 result set

2017-08-02 Thread Peter Koukoulis
david, thanks for the help. Would this be the equivalent, for the statement in your email, for table TEST1 (x integer, y varchar(20)): ft_node=# SELECT md5(string_agg(vals::text, '')) ft_node-# from (select x,y from test1) vals(x,y); ? Peter On Thu, 3 Aug 2017 at 00:25 David G

[GENERAL] select md5 result set

2017-08-02 Thread Peter Koukoulis
Hi I'm attempting to emulate feature available in Oracle, namely dbs_sqlhash. For example, given the following table data values: SQL> select x,y from test1; X Y -- 5 White 1 YYY 2 Goodbye 6 Black I can create a single hash value over the entire result set, specific

Re: [HACKERS] [GENERAL] Not able to create collation on Windows

2017-08-01 Thread Peter Eisentraut
tead, don't know for sure. > > I think this is actually a bug, because the collations code clearly > means to allow clones of the C/POSIX locales --- see eg lc_collate_is_c, You seem to say that we should support a "POSIX" locale even on systems where the C library does

Re: [GENERAL] upsert and update filtering

2017-07-31 Thread Peter Geoghegan
? That's quite possible. An ON CONFLICT's UPDATE accepts a WHERE clause, which can reference both existing and excluded tuples. That WHERE clause can back out of the UPDATE based on whatever criteria you like. -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgs

Re: [GENERAL] Dealing with ordered hierarchies

2017-07-31 Thread Peter J. Holzer
e_number). That way two transactions won't be able to add a node with the same sequence number under the same parent. You will have to handle duplicate key errors, though. hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we

Re: [GENERAL] upsert: is there a shortcut?

2017-07-28 Thread Peter Geoghegan
ture you describe. Subtleties like this could easily be missed. -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Indexes being ignored after upgrade to 9.5

2017-07-26 Thread Peter Geoghegan
On Wed, Jul 26, 2017 at 2:05 PM, Peter Geoghegan wrote: > On Tue, Jul 25, 2017 at 10:34 PM, Nick Brennan wrote: >> We've added duplicate indexes and analyzing, however the new indexes are >> still ignored unless we force using enable_seqscan=no or reduce >> random

Re: [GENERAL] Strange case of database bloat

2017-07-26 Thread Peter Geoghegan
break down, in terms of how much each individual index grows in size? You say that the problem is with both indexes and tables. How much of this is table bloat, and how much is index bloat? Thanks [1] https://postgr.es/m/CAH2-Wz=sfakvmv1x9jh19ej8am8tzn9f-yecips9hrrrqss...@mail.gmail.com -- Pet

Re: [GENERAL] Indexes being ignored after upgrade to 9.5

2017-07-26 Thread Peter Geoghegan
hile? Are these unique indexes or not? Do you have a workload with many UPDATEs? I ask all these questions because I think it's possible that this is explained by a regression in 9.5's handling of index bloat, described here: http://postgr.es/m/CAH2-Wz=sfakvmv1x9jh19ej8am8tzn9f-yecips

Re: [GENERAL] Imperative Query Languages

2017-07-05 Thread Peter Geoghegan
ent to SQL, and so wouldn't help with this general problem. Quel wasn't successful because it was only somewhat better than SQL was at the time. This is a conversation that I had a few times when I worked for Heroku, with coworkers that weren't on the database team. They asked simil

Re: [GENERAL] insert on conflict

2017-06-27 Thread Peter Geoghegan
ation in the joined-on column with MERGE). But, MERGE would be faster for bulk loading, which is what MERGE is good for. -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] pglogical vs. built-in logical replication in pg-10

2017-06-22 Thread Peter Eisentraut
ctionality can be expected to trickle into core eventually. One advantage of the in-core feature is that the initial table synchronization can be parallelized, which can make the initial setup faster and more robust. pglogical will probably support that too at some point once PG10 is out. -- Pe

Re: Fwd: [GENERAL] Streaming replication bandwith per table

2017-06-21 Thread Peter Eisentraut
On 6/21/17 22:04, Maeldron T. wrote: > * Logical replication is in 10.0 Beta 1. I might be oldschool but I > would install 10.1 or maybe 10.0.2 into production There are also other logical replication options such as pglogical and londiste. -- Peter Eisentraut http

Re: [GENERAL] Streaming replication bandwith per table

2017-06-19 Thread Peter Eisentraut
ical replication. That would save you the bandwidth for updating all the indexes at least. It might work for you. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] effective_io_concurrency increasing

2017-06-19 Thread Peter Geoghegan
On Mon, Jun 19, 2017 at 4:51 PM, Peter Geoghegan wrote: > This would make only the first lookup for each distinct value on the > outer side actually do an index scan on the inner side. I can imagine > the optimization saving certain queries from consuming a lot of memory > bandwidth

Re: [GENERAL] effective_io_concurrency increasing

2017-06-19 Thread Peter Geoghegan
imagine the optimization saving certain queries from consuming a lot of memory bandwidth, as well as saving them from pinning and locking the same buffers repeatedly. -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] effective_io_concurrency increasing

2017-06-19 Thread Peter Geoghegan
prefetching heap pages mattering a lot less for a primary key index, where there is a strong preexisting correlation between physical and logical order, while also mattering a lot more than what I describe in other cases. I suppose that you need both. -- Peter Geoghegan -- Sent via pgsql-gene

Re: [GENERAL] effective_io_concurrency increasing

2017-06-19 Thread Peter Geoghegan
lemented. Index scans will on average have a much more random access pattern than what is typical for bitmap heap scans, making this optimization more compelling, so hopefully someone will get around to this. -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.or

Re: [GENERAL] plpgsql function with offset - Postgres 9.1

2017-06-15 Thread Peter J. Holzer
er column in tablea, like example: row_migrated boolean --> if > that helps Yes that's probably the best way. Instead of using an additional column you could also make ready tristate: New -> ready_for_migration -> migrated. > 2. Queries with hight OFFSET values have bad perfor

Re: [GENERAL] storing large files in database - performance

2017-05-16 Thread Peter J. Holzer
e a long time, and the time seems to grow exponentially with > file size rather than linearly. > > > > Do these numbers surprise you? Yes. on my system, storing a 25 MB bytea value takes well under 1 second. hp -- _ | Peter J. Hol

Re: [GENERAL] relation create time

2017-05-10 Thread Peter Eisentraut
ation stored anywhere in the catalog? It is not. > Or I > need to store it myself? Is there any plan to add such meta data > information to the catalog as a feature? Thanks a lot! You could write an event trigger to record it. -- Peter Eisentraut http://www.2ndQua

Re: [GENERAL] character encoding of the postgres database

2017-05-10 Thread Peter Eisentraut
On 5/10/17 11:48, Sandeep Gupta wrote: > Currently, the postgres database by has SQL_ASCII encoding. > Is it possible to start the postgres database with UTF-8 encoding, instead > of modifying it later. This is done when initdb is run, with the --locale and/or --encoding option.

Re: [GENERAL] Python versus Other Languages using PostgreSQL

2017-05-09 Thread Peter Devoy
n because there are a plethora of domain, human and environmental factors which could lead to language and architecture choices, not least of which is skills available in the labour market. Peter 3XE P: 01326 567155 M: 07770 693662 A: 3XE Ltd Tremough Innovation Centre PENRYN TR10 9TA 3XE Ltd · Regi

[GENERAL] Any experiences with using PhpUnit's DbUnit extension with Postgres?

2017-05-06 Thread Peter Devoy
Peter -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Caching and Blobs in PG? Was: Can PG replace redis, amqp, s3 in the future?

2017-05-05 Thread Peter J. Holzer
On 2017-05-05 11:46:55 -0700, John R Pierce wrote: > On 5/5/2017 11:28 AM, Peter J. Holzer wrote: > > On 2017-05-04 23:08:25 +0200, Sven R. Kunze wrote: > > On 03.05.2017 12:57, Thomas Güttler wrote: > > Am 02.05.2017 um 05:43 schrieb Jeff Janes: &g

Re: [GENERAL] Caching and Blobs in PG? Was: Can PG replace redis, amqp, s3 in the future?

2017-05-05 Thread Peter J. Holzer
ich logically belongs together will resolve a bottleneck, then by all means separate them. hp [1] "I read somewhere on the internet" is usually not a good reason. -- _ | Peter J. Holzer| A coding theorist is someone who doesn't |_|_) || think Al

Re: [GENERAL] PQerrorMessage documentation

2017-05-04 Thread Peter Eisentraut
presume that in this case the string > will end with just \0, correct? It's not going to be \0\0 like with MSVC. I don't know what you mean by \0\0 with MSVC, but it is correct that the error message string will end with \0, like any C string. -- Peter Eisentraut http://

Re: [GENERAL] Logical replication

2017-05-01 Thread Peter Eisentraut
to use both at the same time?: > > 9.4 ---> 10(instance 1)---> 10(instance 2) > pglogicalpglogical > builtinbuiltin That is possible. pglogical will continue to exist, so you can also keep using it if you already have it.

Re: [GENERAL] all serial type was changed to 1

2017-04-30 Thread Peter Geoghegan
t; and found all tables’ id were reset to 1. I've heard of this happening before. I never determined what the cause was. -- Peter Geoghegan VMware vCenter Server https://www.vmware.com/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your s

Re: [GENERAL] AEXPR_OR, AEXPR_AND is not in postgres 9.6, how can I rewrite where it used in 9.3 ?

2017-04-04 Thread Peter Eisentraut
db85c738364fe8f7965209e08c6be about how the internal representation was changed. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Handling psql lost connections

2017-03-30 Thread Peter J. Holzer
n to the server, start a screen session and psql in the screen session. Then if your network connection drops you can simply login again and resume the screen session. Of course this only works if you have a shell login on the server which may not be the case. hp --

Re: [GENERAL] inevitability of to_date() when converting representations which don't represent whole timestamps

2017-03-30 Thread Peter J. Holzer
revious Monday”, “the next Monday” might be useful in practice, but whichever of them you pick, you've picked the wrong one with a probability of 2/3. “The first monday in the year -1 of the proleptic Gregorian calendar” would be consistent with how to_timestamp('12:34:56', '

Re: [GENERAL] Postgres Permissions Article

2017-03-30 Thread Peter J. Holzer
eed to be the owner of the referencing table and have the references privilege on the referenced table. It's not symmetrical.) hp -- _ | Peter J. Holzer| A coding theorist is someone who doesn't |_|_) || think Alice is crazy. | | | h...@hjp.at

Re: [GENERAL] Autoanalyze oddity

2017-03-23 Thread Peter J. Holzer
On 2017-03-05 12:01:07 +0100, Peter J. Holzer wrote: [...] > At the current rate of inserts, this threshold will be reached on > March 24nd. I'll check whether the table is analyzed then. It was (a little earlier than expected because pg_class.reltuples didn't increase

Re: [GENERAL] UPDATE ... ON CONFLICT DO NOTHING

2017-03-14 Thread Peter Geoghegan
f an UPDATE than it is to back out of an INSERT. If you're really interested, search through the -hackers archives from around April of 2015. -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postg

Re: [GENERAL] Autoanalyze oddity

2017-03-05 Thread Peter J. Holzer
On 2017-03-05 08:39:05 -0800, Adrian Klaver wrote: > On 03/05/2017 03:01 AM, Peter J. Holzer wrote: > >So it is likely that something happened on that day (disk full?) which > >wiped out the contents of pg_stat_user_tables. > > Are there any logs from that time, either Postg

Re: [GENERAL] Autoanalyze oddity

2017-03-05 Thread Peter J. Holzer
On 2017-03-03 06:39:35 -0800, Adrian Klaver wrote: > On 03/03/2017 12:33 AM, Peter J. Holzer wrote: > >This is with PostgreSQL 9.5.6 on Debian Linux. > > > >I noticed that according to pg_stat_user_tables autoanalyze has never > >run on a lot of tables. Here is one exa

[GENERAL] Autoanalyze oddity

2017-03-03 Thread Peter J. Holzer
t pg_stats seems to be reasonably current: I see entries in most_common_vals which were only inserted in January. Is it possible that autoanalyze runs without updating pg_stat_user_tables? hp -- _ | Peter J. Holzer| A coding theorist is someone who doesn't |_|_) |

[GENERAL] Function out there to identify pseudo-empty fields, e.g. "n/a", "--", etc?

2017-02-16 Thread Peter Devoy
d be trivial to create but no sense in reinventing the wheel. Kind regards Peter -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Loose indexscan and partial indexes

2017-02-10 Thread Peter J. Holzer
On 2017-02-10 14:24:36 +0100, Thomas Kellerer wrote: > Peter J. Holzer schrieb am 10.02.2017 um 14:02: > > So it's doing a sequential scan on the initial select in the recursive > > CTE, but using the index on the subsequent selects. > > > > But why? If it uses

[GENERAL] Loose indexscan and partial indexes

2017-02-10 Thread Peter J. Holzer
AND (periodizitaet > t_1.periodizitaet)) Heap Fetches: 2 Planning time: 8.883 ms Execution time: 0.801 ms (23 rows) 800 times faster :-). hp -- _ | Peter J. Holzer| A coding theorist is someone who doesn't |_|_) ||

Re: [GENERAL] Are new connection/security features in order, given connection pooling?

2017-01-13 Thread Peter J. Holzer
ou wouldn't want a web-frontend to cache plain-text passwords to resubmit them for each transaction, but to use something more ethereal, like session cookies or kerberos tickets. hp -- _ | Peter J. Holzer| A coding theorist is someone who doesn't |_|_) |

Re: [GENERAL] COPY: row is too big

2017-01-04 Thread Peter J. Holzer
n be filled. Keeping all this in mind, the limit is between 250 | and 1600. hp -- _ | Peter J. Holzer| A coding theorist is someone who doesn't |_|_) || think Alice is crazy. | | | h...@hjp.at | -- John Gordon __/ | http://www.hjp.at/ |ht

Re: [GENERAL] What's the benefit (or usage scenario) of a "typed table"?

2017-01-03 Thread Peter Eisentraut
_type; > > I wonder what the benefit of a typed table is and when this would be useful? One use is with PL/Proxy. You create the type on the proxy, thus allowing you to define functions using the type. Then create the table on the backend from the type, thus ensuring they are

Re: [GENERAL] explain analyze showed improved results without changes, why?

2016-12-25 Thread Peter J. Holzer
is that between those two queries a row was inserted with a really low (off, sz) value which matches the query. So now the query can return after checking only a handful of rows. LIMIT, EXISTS, etc. are awful when you want predictable performance. You may be lucky and the rows you are looking

Re: [GENERAL] Is is safe to use SPI in multiple threads?

2016-12-23 Thread Peter J. Holzer
I can easily scale out if necessary: Currently my database and server process run on the same machine, but I could distribute them over several machines with (almost) no change in logic. hp -- _ | Peter J. Holzer| A coding theorist is someone who doesn't |_|_)

Re: [GENERAL] How well does PostgreSQL 9.6.1 support unicode?

2016-12-20 Thread Peter Devoy
The comments in here may be of help: https://github.com/postgres/postgres/blob/master/src/include/mb/pg_wchar.h Kind regards Peter -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] CRM where pg is a first class citizen?

2016-12-15 Thread Peter Devoy
search?utf8=%E2%9C%93&q=PDO KR Peter -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Index size

2016-12-10 Thread Peter J. Holzer
will have to be updated. You can set fillfactor to a smaller value to make this less likely. hp -- _ | Peter J. Holzer| A coding theorist is someone who doesn't |_|_) || think Alice is crazy. | | | h...@hjp.at | -- John Gordon __/ | http://www.hj

Re: [GENERAL] Avoid sorting when doing an array_agg

2016-12-04 Thread Peter Geoghegan
ardinality leading attribute, so this habit works against tuplesort. (Assuming a leading attribute of pass-by-value type, or with abbreviated key support.) -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Avoid sorting when doing an array_agg

2016-12-04 Thread Peter Geoghegan
rmine that it would be just fine to use the C locale, since the user isn't entitled to assume anything about the exact sort order. There are of course cases where this can make a huge difference. -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-26 Thread Peter Geoghegan
erspective. What are your thoughts on the back-and-forth between myself and Tom concerning predicate locks within heap_fetch_tuple() path last weekend? I now think that there might be an outstanding concern about ON CONFLICT DO NOTHING + SSI here. -- Peter Geoghegan -- Sent via pgsql-

  1   2   3   4   5   6   7   8   9   10   >