Re: [GENERAL] Build in function to verify email addresses

2017-11-16 Thread Andreas Joseph Krogh
e convenient to have datatypes for. Being an open-source project I guess one must show initiative and start a discussion on -hackers to see what interesst there's in having one in core. I for one hope there will be.   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 90

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

2017-11-13 Thread Andreas Joseph Krogh
På tirsdag 14. november 2017 kl. 00:44:11, skrev Peter Geoghegan mailto:p...@bowt.ie>>: On Mon, Nov 13, 2017 at 2:05 PM, Andreas Joseph Krogh wrote: > When sorting on text, we're usually doing so using an multi-column index, like for instance "CREATE INDEX xxx ON my_tab

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

2017-11-13 Thread Andreas Joseph Krogh
På mandag 13. november 2017 kl. 22:28:40, skrev Peter Geoghegan mailto:p...@bowt.ie>>: On Mon, Nov 13, 2017 at 12:48 PM, Andreas Joseph Krogh wrote: > Thanks. As the person that worked on abbreviated keys, I'd like to hear about how you get with this. How much faster is it for

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

2017-11-13 Thread Andreas Joseph Krogh
should be quite a bit of debug output from that that specifically mentions abbreviated keys.   Thanks.   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>  

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

2017-11-13 Thread Andreas Joseph Krogh
På mandag 13. november 2017 kl. 21:40:47, skrev Peter Geoghegan mailto:p...@bowt.ie>>: On Mon, Nov 13, 2017 at 11:48 AM, Andreas Joseph Krogh wrote: > Ok, so I have to explicitly specify like this: > > create table test(id serial primary key, name varchar collate "nb_NO

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

2017-11-13 Thread Andreas Joseph Krogh
På mandag 13. november 2017 kl. 19:07:53, skrev Peter Geoghegan mailto:p...@bowt.ie>>: On Mon, Nov 13, 2017 at 12:27 AM, Andreas Joseph Krogh wrote: > In PG-10, with ICU enabled, is abbreviated keys now enabled? Yes. ICU will use abbreviated keys on every platform, including Window

[GENERAL] PG-10 + ICU and abbreviated keys

2017-11-13 Thread Andreas Joseph Krogh
Hi.   In PG-10, with ICU enabled, is abbreviated keys now enabled?   If so, using locale=nb_NO.UTF-8, do I have to use a ICU-specific locale to take advantage of abbreviated keys?   Thanks.   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:a

Re: [GENERAL] database size changed after restoring using pg_restore

2017-11-08 Thread Andreas Joseph Krogh
so did a few more databases using the same steps and they all appeared to be smaller. Is that normal? Yep.   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>  

Re: [GENERAL] Postgresql.conf not found

2017-11-03 Thread Andreas Kretschmer
test=*# Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com -- 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] Delete Duplicates with Using

2017-10-15 Thread Andreas Kretschmer
where ctid not in (select ctid from keep);; DELETE 2 test=*# select * from dubletten ; c1 | c2 | c3 ++ 1 | 1 | 1 1 | 2 | 3 2 | 3 | 4 3 | 4 | 5 4 | 5 | 5 5 | 5 | 5 (6 Zeilen) test=*# Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www

[GENERAL] OR-clause support for indexes

2017-10-08 Thread Andreas Joseph Krogh
Hi.   There was a while ago a proposed patch for adding $subject; https://commitfest.postgresql.org/8/454/   Is this being worked on? Any progress in btree-support? -- Andreas Joseph Krogh

Re: [GENERAL] Corrupt index

2017-08-15 Thread Andreas Kretschmer
On 15 August 2017 21:54:56 GMT+02:00, Daryl Stultz wrote: > >>>We are using PostgreSQL 9.3.14 on a managed Amazon RDS with a > > >>Are you using reindex concurrently? There was a bugfix in 9.3.16 (+-1, >i'm not sure). > >Hi Andreas, not that I'm aware

Re: [GENERAL] Corrupt index

2017-08-15 Thread Andreas Kretschmer
On 15 August 2017 21:24:29 GMT+02:00, Daryl Stultz wrote: >Hello, > >We are using PostgreSQL 9.3.14 on a managed Amazon RDS with a > Are you using reindex concurrently? There was a bugfix in 9.3.16 (+-1, i'm not sure). Regards, Andreas -- 2ndQuadrant - The PostgreSQ

Re: [GENERAL] cluster question

2017-08-14 Thread Andreas Kretschmer
Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com -- 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] cluster question

2017-08-13 Thread Andreas Kretschmer
over.conf file ? > >Alex I would suggest you repmgr, with this tool you can do "repmgr standby switchover" to perform such tasks. Regards, Andreas. -- 2ndQuadrant - The PostgreSQL Support Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] vacuum on streaming replication

2017-07-30 Thread Andreas Kretschmer
t update, nor can I >run >vacuum against it as its in recovery mode. > >So how do update the stats and how will it affect my queries ? The standby is read only, vacuum runs on the master and replicated to the standby. Analyse as well. Regards, Andreas -- 2ndQuadrant - The Pos

Re: [GENERAL] Schemas and foreign keys

2017-07-21 Thread Andreas Kretschmer
t primary key, master_id int references public.master_table); CREATE TABLE test=*# create table demo2.demo_table(id int primary key, master_id int references public.master_table); CREATE TABLE Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com -- Sent via pgsql-general ma

Re: [GENERAL] Logging at schema level

2017-07-20 Thread Andreas Kretschmer
Am 21.07.2017 um 08:11 schrieb Nikhil: Schema = tenant. So basically tenant level logging. On 21-Jul-2017 11:21 AM, "Andreas Kretschmer" <mailto:andr...@a-kretschmer.de>> wrote: On 21 July 2017 07:10:42 GMT+02:00, Nikhil mailto:nikhilsme...@gmail.com>> wrote:

Re: [GENERAL] Streaming Replication archive_command is really needed?

2017-07-20 Thread Andreas Kretschmer
Am 21.07.2017 um 08:01 schrieb Michael Paquier: On Thu, Jul 20, 2017 at 10:07 PM, Leonardo M. Ramé wrote: El 20/07/17 a las 16:57, Andreas Kretschmer escribió: On 20 July 2017 21:46:09 GMT+02:00, "Leonardo M. Ramé" wrote: Hi, I wonder if archive_mode=on and archive_command par

Re: [GENERAL] Logging at schema level

2017-07-20 Thread Andreas Kretschmer
r tenant? Regards, Andreas. -- 2ndQuadrant - The PostgreSQL Support Company -- 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] Backward compatibility

2017-07-20 Thread Andreas Kretschmer
n which can return the version of >the server I'm running? > > Select version(); Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company -- 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] Streaming Replication archive_command is really needed?

2017-07-20 Thread Andreas Kretschmer
On 20 July 2017 21:46:09 GMT+02:00, "Leonardo M. Ramé" wrote: >Hi, I wonder if archive_mode=on and archive_command parameters in >postgresql.conf are really needed for streaming replication between two > >servers (master-slave). > >Regards, No. Andreas --

[GENERAL] Storing LOs outside the database and having a proper cleanup-mechanism to prevent dangling files

2017-07-17 Thread Andreas Joseph Krogh
anup job can know the difference between such an INSERT-entry in origo_email_message_file_operation caused by ROLLBACK and and INSERT-entry caused by an in-progress insertEmail() operation.   Does anyone have a robust mechanism for cleaning up files in such scenarios?    Thanks.   -- Andre

Re: [GENERAL] RAM, the more the merrier?

2017-06-29 Thread Andreas Kretschmer
>together >somehow? (partitioning, replication, ...) With current versions you can set shared buffers to, for instance, 40% of ram, no problem. Tune also the checkpointer. Regards, Andreas. -- 2ndQuadrant - The PostgreSQL Support Company -- Sent via pgsql-general mailing list (pgsql-

Re: [GENERAL] Configure Qt Creator to work with PostgreSQL to extensions development

2017-06-25 Thread Andreas Joseph Krogh
På søndag 25. juni 2017 kl. 23:02:32, skrev Adrian Klaver < adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com>>: On 06/25/2017 01:34 PM, Andreas Joseph Krogh wrote: > På søndag 25. juni 2017 kl. 17:04:02, skrev Adrian Klaver > mailto:adrian.kla...@aklaver.com>>:

Re: [GENERAL] Configure Qt Creator to work with PostgreSQL to extensions development

2017-06-25 Thread Andreas Joseph Krogh
nment for developing PG-extentions, not linking Qt in from an extention.   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>  

Re: [GENERAL] Download 9.6.3 Binaries

2017-06-23 Thread Andreas Kretschmer
l Sapir >Lucee Core Developer >Lucee.org <http://lucee.org/> Yeah, use the community version from postgresql.org ;-) Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company -- 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 Andreas Joseph Krogh
ing with large objects and streaming to clients (JDBC). The only solution (I've found) which doesn't explode in memory-usage is using LOs (OIDs). Note that we're dealing with multi-gigabytes objects, which need to be "transactional safe" (hence stored in the DB).   --

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

2017-06-22 Thread Andreas Joseph Krogh
successfully using logical decoding, correct?     > > I wish PG in some future version will address these quirks so one can operate on LOs more smoothly. You're welcome to help...   Every time issues arise regarding LOs there seems to be little interest to improve matters, and if it do

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

2017-06-22 Thread Andreas Joseph Krogh
På torsdag 22. juni 2017 kl. 15:25:20, skrev Achilleas Mantzios < ach...@matrix.gatewaynet.com <mailto:ach...@matrix.gatewaynet.com>>: On 22/06/2017 13:38, Andreas Joseph Krogh wrote: På torsdag 22. juni 2017 kl. 11:43:02, skrev Achilleas Mantzios < ach...@matrix.gatewaynet.

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

2017-06-22 Thread Andreas Joseph Krogh
På torsdag 22. juni 2017 kl. 11:43:02, skrev Achilleas Mantzios < ach...@matrix.gatewaynet.com <mailto:ach...@matrix.gatewaynet.com>>: On 22/06/2017 11:21, Andreas Joseph Krogh wrote: Hi.   1. Why should one prefer built-in logical replication in pg-10 to pglogical, does it do anythi

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

2017-06-22 Thread Andreas Joseph Krogh
pglogical replicate large objects? I cannot find any notes about large-objects under "Limitations and Restrictions":  https://www.2ndquadrant.com/en/resources/pglogical/pglogical-docs/   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <ma

Re: [GENERAL] enable PostgreSQL SSL from RPM package installation

2017-06-21 Thread Andreas Kretschmer
>Just wondering if these RPMs are compiled with SSL enabled? > >Thanks. > >Regards >Dylan Yes, it is compiled with SSL. Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] Streaming replication bandwith per table

2017-06-19 Thread Andreas Kretschmer
ut it. > >Try perhaps logical replication. That would save you the bandwidth for >updating all the indexes at least. It might work for you. Not only the traffic for indexes, for Vacuum too. (and that can be a lot) Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company -- Sent

Re: [GENERAL] performance considerations of jsonb vs separate rows

2017-06-19 Thread Andreas Kretschmer
no. For session-data please consider unlogged tables. Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company -- 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 Andreas Kretschmer
recommendations? as far as i know, at the moment only bitmap-index-scans would benefit from higher values. You can try 16 or 32 as starting point. (if you have a proper io-controller with cache) (it has nothing to do with parallel execution of queries) Regards, Andreas -- 2ndQuadrant - The

Re: [GENERAL] storing postgres data on dropbox

2017-06-18 Thread Andreas Kretschmer
(dumps), but i would strongly advise against to store the db there. PostgreSQL relys on the fsync, that's not possible in this case. I'm sure, a total data disaster would not be a question, only when it would happen. Why not a PostgreSQL-database somewhere in the cloud? Regard

[GENERAL] OR-clause support for indexes

2017-06-17 Thread Andreas Joseph Krogh
e you made any progress making it work for btree?   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Re: [GENERAL] Repmgr + pgbouncer - Notification of master promotion to application level ...

2017-06-15 Thread Andreas Kretschmer
date for an automation tool like ansible, perhaps?) use auth_query instead of auth_file. Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com -- 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] Repmgr + pgbouncer - Notification of master promotion to application level ...

2017-06-14 Thread Andreas Kretschmer
Am 15.06.2017 um 08:26 schrieb Rory Campbell-Lange: On 15/06/17, Andreas Kretschmer (andr...@a-kretschmer.de) wrote: Am 15.06.2017 um 01:18 schrieb Martin Goodson: ...Do people setup pgbouncer nodes on the database servers themselves, on application servers, in the middle tier between the

Re: [GENERAL] Ordering of window functions with no order specified?

2017-06-14 Thread Andreas Kretschmer
indow-function and for the result-set. Use alwyas an explicit ORDER BY if you expect an ordered result. Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com -- 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] Repmgr + pgbouncer - Notification of master promotion to application level ...

2017-06-14 Thread Andreas Kretschmer
milar in this way: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=274bb2b3857cc987cfa21d14775cae9b0dababa5 https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=721f7bd3cbccaf8c07cad2707826b83f84694832 ) Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Com

Re: [GENERAL] autovacuum holds exclusive lock on table preventing it from to be updated

2017-06-13 Thread Andreas Kretschmer
gt;chimera | t_inodes | | >ShareUpdateExclusiveLock | t | enstore | autovacuum: VACUUM >public.t_inodes (to prevent wraparound)| 2017-06-13 >12:31:04.870064-05 | 00:28:50.276437 | 40672 > It is a autocacuum to prevent wraparound, you can't

Re: [GENERAL] Slow query plan used

2017-06-01 Thread Andreas Kretschmer
Am 01.06.2017 um 14:07 schrieb Wetzel, Juergen (Juergen): Am 31.05.2017 um 13:27 schrieb Wetzel, Juergen (Juergen): Only 130 rows out of the 3 have ARCHIVED = 0 in this case i would suggest a partial index: create index on (archived) where archived = 0; Thanks, Andreas. Sorry for the

Re: [GENERAL] Slow query plan used

2017-05-31 Thread Andreas Kretschmer
Am 31.05.2017 um 13:27 schrieb Wetzel, Juergen (Juergen): Only 130 rows out of the 3 have ARCHIVED = 0 in this case i would suggest a partial index: create index on (archived) where archived = 0; Thanks, Andreas. Sorry for the confusion about the table names. The hint with the partial

Re: [GENERAL] Slow query plan used

2017-05-31 Thread Andreas Kretschmer
create index on (archived) where archived = 0; You can also increase the statistics for the columns subject and mailContent ALTERTABLEALTERCOLUMN SETSTATISTICS=1000; (as example, the default-value is 100) Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com

Re: [GENERAL] COPY: row is too big

2017-05-26 Thread Andreas Kretschmer
Am 26.05.2017 um 14:07 schrieb doganmeh: I tried varchar(12) also, nothing changed. My questions is 1) I have 672x12=8,064 characters in the first row (which are actually the headers), why would it complain that it is 8760. I am assuming here type `text` occupies 1 byte for a character. plea

Re: [GENERAL] Inheritance and foreign keys

2017-05-25 Thread Andreas Kretschmer
Not possible - yet. Am 25. Mai 2017 13:48:59 MESZ schrieb Jayadevan M : >Hi, > >I designed three tables so that one table inherits another, and the >third >table references the parent table. If a record is inserted into the >third >table and the value does exist in the parent table indirectly, bec

[GENERAL] How to include BIGINT-column in RUM-index sorted by timestamp

2017-05-15 Thread Andreas Joseph Krogh
his indicates that the folder_id column, which is part of the index, isn't actually "part of the index", meaning it's not used in the index for some reason.   Can you tell me how to craft an index so that folder_id = ANY ('{44965,2470520}'::bigint[]) is part of t

Re: [GENERAL] Installing repmgr alongside PostgreSQL installed via EnterpriseDB installer instead of repositories?

2017-05-11 Thread Andreas Kretschmer
ommand service_promote_command| Keep me informed if that works, thx. Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com

Re: [GENERAL] Upgrading postgresql minor version

2017-05-10 Thread Andreas Joseph Krogh
ge-repo. Maybe you'll have more luck asking that other places than a PG-mailing-list. -- Andreas Joseph Krogh  

Re: [GENERAL] Upgrading postgresql minor version

2017-05-10 Thread Andreas Joseph Krogh
of failure just to replace them back. Is it doable? How?   What about just re-installing the previous version the same way you installed the "patch-release"-version? -- Andreas Joseph Krogh  

Re: [GENERAL]

2017-05-07 Thread Andreas Kretschmer
olumns AS cols where cols.table_schema = 'public' AND cols.table_name = 'abcatcol' ORDER BY cols.ordinal_position ASC; is this better? Regards, Andreas Kretschme? -- Andreas Kretschmer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Tr

Re: [GENERAL] GENERAL - [How to check if the array contains the element.]

2017-04-26 Thread Andreas Kretschmer
. You can use the overlap - operator: test=*# select array[1,2,3,4] && array[1,4,5,7]; ?column? -- t (1 Zeile) test=*# select array[1,2,3,4] && array[10,40,50,70]; ?column? -- f (1 Zeile) Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www

Re: [GENERAL] DROP INDEX CASCADE doesn't want to drop unique constraints?

2017-04-24 Thread Andreas Kretschmer
> any special cases (https://www.postgresql.org/docs/9.3/static/ > sql-dropindex.html). This is with PostgreSQL 9.3.15.  > > The actual command is: > > drop index if exists employer_employerid_key cascade; > > Any ideas if this is normal or why it happens? Drop the co

Re: [GENERAL] How to create unique index on multiple columns where the combination doesn't matter?

2017-03-22 Thread Andreas Kretschmer
1, c2, c3], 'asc'::text))=({1,2,3})« existiert bereits. test=*# (sorry for german messages, it means error, dublicate entry ...) Regards, Andreas Kretschmer -- Andreas Kretschmer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via

Re: [GENERAL] controlled switchover with repmgr

2017-03-14 Thread Andreas Kretschmer
ou can take care that there are no open transactions running on the master, without data loss. https://github.com/2ndQuadrant/repmgr/blob/master/README.md Regards, Andreas Kretschmer -- Andreas Kretschmer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training &

Re: [GENERAL] createuser: How to specify a database to connect to

2017-03-14 Thread Schmid Andreas
> -Ursprüngliche Nachricht- > Von: Adrian Klaver [mailto:adrian.kla...@aklaver.com] > Gesendet: Montag, 13. März 2017 17:28 > An: Tom Lane > Cc: Schmid Andreas; 'pgsql-general@postgresql.org' > Betreff: Re: [GENERAL] createuser: How to specify a database to conn

[GENERAL] createuser: How to specify a database to connect to

2017-03-13 Thread Schmid Andreas
Hi I'm trying to add a new DB user with the following command from my client machine: createuser -h my.host.name -U mysuperusername --pwprompt newusername I'm getting the following message: createuser: could not connect to database postgres: FATAL: no pg_hba.conf entry for host "10.0.0.1", use

Re: [GENERAL] RUM-index and support for storing BIGINT as part of a tsvector+timestamp

2017-02-03 Thread Andreas Joseph Krogh
Ping...   Any feedback is welcome, thanks.   På torsdag 12. januar 2017 kl. 13:13:34, skrev Andreas Joseph Krogh < andr...@visena.com <mailto:andr...@visena.com>>: Hi PostgresPro-guys.   I've asked this before but didn't get any response, so I'll try again. I know

Re: [GENERAL] Searching array for multiple items

2017-01-25 Thread Andreas Joseph Krogh
ou give an example with definition of index and explain-plan?   It would be interesting to see how this performs vs. contrib/intarray.   Thanks.   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>  

[GENERAL] Timestamp index not being hit

2017-01-14 Thread Andreas Terrius
Hello Ive been running into an issue with postgresql not hitting index on select queries. Below is the sql query I used to test my issue. CREATE TABLE idxtbl ( id BIGINT, aint BIGINT, btime TIMESTAMPTZ, ctext TEXT, dbool BOOLEAN, PRIMARY KEY(id) ); --Inserted 10 mil random data /* TEST TIMESTAMP

[GENERAL] RUM-index and support for storing BIGINT as part of a tsvector+timestamp

2017-01-12 Thread Andreas Joseph Krogh
p often is't enough because often there is some other dimention which is *very* relevant to limit the results (like what folder, or account, to search for email-messages in, instead of searching for all in the system).   Thanks.   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +

Re: [GENERAL] Question slow query

2017-01-11 Thread Andreas Joseph Krogh
ified);   Am I missing something?    Yes, you've not shown us: 1. The query 2. The schema 3. Complete EXPLAIN-output   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>  

Re: [GENERAL] join_collapse_limit = 14

2017-01-07 Thread Andreas Joseph Krogh
På lørdag 07. januar 2017 kl. 18:25:42, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: Andreas Joseph Krogh writes: > På lørdag 07. januar 2017 kl. 17:48:49, skrev Tom Lane <mailto:t...@sss.pgh.pa.us>>: >  If you've got just one problem query, it might be worth your ti

Re: [GENERAL] join_collapse_limit = 14

2017-01-07 Thread Andreas Joseph Krogh
På lørdag 07. januar 2017 kl. 17:48:49, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: Andreas Joseph Krogh writes: > I wonder; In general, is there any downside of having join_collapse_limit = 14 > on modern hardware (32 cores, 64GB RAM), and geqo_threshold=16 ? > I'm aw

[GENERAL] join_collapse_limit = 14

2017-01-07 Thread Andreas Joseph Krogh
s and performance was acceptable again.   I wonder; In general, is there any downside of having join_collapse_limit = 14 on modern hardware (32 cores, 64GB RAM), and geqo_threshold=16 ? I'm aware of it increasing planning-time, but is this really an issue in practice?   Thanks.   -- Andreas Joseph

Re: [GENERAL] Performance degradation when using auto_explain

2017-01-04 Thread Andreas Kretschmer
Kisung Kim wrote: > And finally I found that auto_explain is the cause of the problem. real hardware or virtual hardware? On virtual there are sometimes problems with exact timings, please read: https://www.postgresql.org/docs/current/static/pgtesttiming.html Regards, Andreas Kretsch

Re: [GENERAL] Er Data Modeller for PostgreSQL

2016-12-23 Thread Andreas Joseph Krogh
//www.jetbrains.com/datagrip/   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>  

Re: [GENERAL] pg_restore to a port where nobody is listening?

2016-12-21 Thread Andreas Kretschmer
ome/postgres/ [PG961] pg_restore -V pg_restore (PostgreSQL) 9.6.1 postgres@pgbox:/home/postgres/ [PG961] pg_restore -h localhost -p 5439 -F d -C -j 2 /var/tmp/exp/ This runs fine but where does it connect to? Nothing is listening on port 5439. No, that can't run. Andreas

Re: [GENERAL] Replacing an existing unique constraint (not UNIQUE INDEX) with primary key

2016-12-20 Thread Andreas Joseph Krogh
På tirsdag 20. desember 2016 kl. 11:42:56, skrev Achilleas Mantzios < ach...@matrix.gatewaynet.com <mailto:ach...@matrix.gatewaynet.com>>: On 20/12/2016 12:27, Andreas Joseph Krogh wrote: På tirsdag 20. desember 2016 kl. 11:02:27, skrev Achilleas Mantzios < ach...@matrix.gatewaynet.

Re: [GENERAL] Replacing an existing unique constraint (not UNIQUE INDEX) with primary key

2016-12-20 Thread Andreas Joseph Krogh
På tirsdag 20. desember 2016 kl. 11:02:27, skrev Achilleas Mantzios < ach...@matrix.gatewaynet.com <mailto:ach...@matrix.gatewaynet.com>>: On 20/12/2016 11:43, Andreas Joseph Krogh wrote: [snip] BEGIN; ALTER TABLE person ADD CONSTRAINT person_pk PRIMARY KEY (entity_id); alter table

[GENERAL] Replacing an existing unique constraint (not UNIQUE INDEX) with primary key

2016-12-20 Thread Andreas Joseph Krogh
L UNIQUE, name VARCHAR NOT NULL ); CREATE TABLE address ( id BIGINT PRIMARY KEY, person_idBIGINT NOT NULL REFERENCES person (id) ); CREATE TABLE phone ( id BIGINT PRIMARY KEY, person_entity_id BIGINT NOT NULL REFERENCES person (entity_id), numberVARCHAR NOT NULL ); INSERT INTO person (id, entity_

Re: [GENERAL] huge table occupation after updates

2016-12-10 Thread Andreas Kretschmer
ry (!) update creates a new row-version and marks the old row as 'old', but don't delete the old row. A Vacuum marks old rows as reuseable - if there is no runnung transaction that can see the old row-version. That's how MVCC works in PostgreSQL. Regards, Andreas Kretschmer -

Re: [GENERAL] Index size

2016-12-04 Thread Andreas Joseph Krogh
but the 2016 Jaguar XF MPG gets 24 mpg. -- Melvin Davidson I reserve the right to fantasize.  Whether or not you wish to share my fantasy is entirely up to you.   Samuel, Please note that the accepted convention in this forum is to bottom post. Please do not top post.   The accepted convention in this forum is to not have purple signature:-)   -- Andreas Joseph Krogh  

Re: [GENERAL] Full text search randomly not working for short prefixes?

2016-12-02 Thread Andreas Joseph Krogh
e problem with "no" seems to be the same.   One can always specify 'simple' as the config, eliminating any "stop-wprd smartness":   andreak=> select to_tsquery('simple', 'a:*');   to_tsquery   'a':* (1 row)   -- Andreas Joseph Krogh

Re: [GENERAL] Backup "Best Practices"

2016-11-23 Thread Andreas Kretschmer
Am 23. November 2016 20:31:21 MEZ, schrieb John R Pierce : >On 11/23/2016 11:20 AM, Israel Brewster wrote: >> How do I determine which those are? Just based on the timestamp if >the >> WAL file, such that I could do something like take the timestamp of >> the last basebackup and delete all WAL

Re: [GENERAL] Partial update on an postgres upsert violates constraint

2016-11-23 Thread Andreas Terrius
Is there any way to check whether the row already exists before checking constraints ? I still want it to fail if it turns out to be a new row (which would violate the not null constraint), but updates the row if it already exists. Since if that is not possible, I would need to do a query to deter

[GENERAL] Partial update on an postgres upsert violates constraint

2016-11-18 Thread Andreas Terrius
Hi, Basically I wanted to do a partial update inside pg (9.5), but it seems that a partial update fails when not all of constraint is fulfilled (such as the not null constraint) Below are the sql queries I used, CREATE TABLE jobs ( id integer PRIMARY KEY, employee_name TEXT NOT NULL,

Re: [GENERAL] Change column type from int to bigint - quickest way

2016-11-16 Thread Andreas Brandl
> On Wed, Nov 16, 2016 at 7:49 AM, Merlin Moncure < mmonc...@gmail.com > wrote: >> On Fri, Nov 11, 2016 at 9:30 AM, Andreas Brandl < m...@andreas-brandl.de > >> wrote: >> You just posted the same question a few days ago -- were the answers >> there uns

[GENERAL] Change column type from int to bigint - quickest way

2016-11-15 Thread Andreas Brandl
till on 9.1 unfortunately - upgrade is going to follow soon after this. Thanks! Andreas -- 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] Incorrect information about GIN-index in RUM's docs

2016-11-15 Thread Andreas Joseph Krogh
På tirsdag 15. november 2016 kl. 08:48:37, skrev Oleg Bartunov < obartu...@gmail.com <mailto:obartu...@gmail.com>>:     On Tue, Nov 15, 2016 at 10:37 AM, Andreas Joseph Krogh mailto:andr...@visena.com>> wrote: This item isn't valid, is it?   * There isn't phrase

[GENERAL] Incorrect information about GIN-index in RUM's docs

2016-11-14 Thread Andreas Joseph Krogh
search was introduced, this isn't really true, or am I missing something?   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

[GENERAL] Question about RUM's TODO-list

2016-11-14 Thread Andreas Joseph Krogh
AND folder_id = ANY( ARRAY[2,3]::BIGINT[]) ORDER BY received_timestamp DESC LIMIT 10;   Thanks.   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

[GENERAL] Change column type from int to bigint - quickest way

2016-11-11 Thread Andreas Brandl
till on 9.1 unfortunately - upgrade is going to follow soon after this. Thanks! Andreas -- 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] which work memory parameter is used for what?

2016-11-09 Thread Andreas Joseph Krogh
På onsdag 09. november 2016 kl. 15:54:13, skrev Adrian Klaver < adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com>>: On 11/08/2016 06:45 PM, Andreas Joseph Krogh wrote: > På onsdag 09. november 2016 kl. 03:02:54, skrev John R Pierce > mailto:pie...@hogranch.com>

Re: [GENERAL] which work memory parameter is used for what?

2016-11-08 Thread Andreas Joseph Krogh
enance_work_mem is used by vacuum and create index operations (including implicit index creation such as add foreign key).   There is no such thing in PG.   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>  

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-11-07 Thread Andreas Joseph Krogh
+                dopt.outputBlobs = false; +                break;     Then this IF sets it back to TRUE:   +    if (dopt.include_everything && !dopt.schemaOnly && !dopt.outputBlobs)          dopt.outputBlobs = true;     ...making it impossible to turn off dumping of blobs.   -- Andr

[GENERAL] Parallel pg_dump/restore and LOs

2016-11-06 Thread Andreas Joseph Krogh
is working.   Are there some plans to make dumping large tables (typically LOs) benefit from parallelism?   Thanks.   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-10-23 Thread Andreas Joseph Krogh
t getting this in master is of course the best.   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>  

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-10-23 Thread Andreas Joseph Krogh
På søndag 23. oktober 2016 kl. 19:15:17, skrev Andreas Joseph Krogh < andr...@visena.com <mailto:andr...@visena.com>>: På søndag 23. oktober 2016 kl. 17:06:57, skrev Guillaume Lelarge < guilla...@lelarge.info <mailto:guilla...@lelarge.info>>: 2016-03-08 21:06 GMT+01

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-10-23 Thread Andreas Joseph Krogh
På søndag 23. oktober 2016 kl. 17:06:57, skrev Guillaume Lelarge < guilla...@lelarge.info <mailto:guilla...@lelarge.info>>: 2016-03-08 21:06 GMT+01:00 Andreas Joseph Krogh mailto:andr...@visena.com>>: På tirsdag 08. mars 2016 kl. 21:03:01, skrev David G. Johnston mailto:david.g.

Re: [GENERAL] pg_upgrade not able to cope with pg_largeobject being in a different tablespace

2016-10-18 Thread Andreas Joseph Krogh
På tirsdag 18. oktober 2016 kl. 12:39:03, skrev Magnus Hagander < mag...@hagander.net <mailto:mag...@hagander.net>>:     On Thu, Oct 13, 2016 at 7:35 AM, Andreas Joseph Krogh mailto:andr...@visena.com>> wrote: På torsdag 13. oktober 2016 kl. 16:09:34, skrev Bruce Momjian mailt

Re: [GENERAL] Query generator

2016-10-16 Thread Andreas Seltenreich
th --dry-run | grep your_table_name Thanks to Julien, sqlsmith's master branch now has an option --exclude-catalog that inhibits use of catalog relations. If you are building from github, you might want to give it another chance with this option. I'll probably do a proper release in next tw

Re: [GENERAL] pg_upgrade not able to cope with pg_largeobject being in a different tablespace

2016-10-13 Thread Andreas Joseph Krogh
På torsdag 13. oktober 2016 kl. 16:09:34, skrev Bruce Momjian mailto:br...@momjian.us>>: On Thu, Oct 13, 2016 at 10:14:08AM +0200, Andreas Joseph Krogh wrote: > I would assume that having pg_largeobject in a separate tablespace is more and > more common these days, having real-

[GENERAL] pg_upgrade not able to cope with pg_largeobject being in a different tablespace

2016-10-13 Thread Andreas Joseph Krogh
velopment of pg_upgrade to cope with this configuration or somehow motivate to getting this issue fixed?   Would any of the PG-companies (2ndQ, EDB, PgPro) take a stab at this?   Any feedback welcome, thanks.   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Re: [GENERAL] HA Cluster Solution?

2016-10-11 Thread Andreas Kretschmer
fy the problematic queries ( for instance using pg_stat_statements) and send this to the team behind odoo. Andreas. -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] Libpq functions & string to obtain connection parameters

2016-10-07 Thread Andreas Kretschmer
037990/connecting-to-postgres-via-database-url-and-unix-socket-in-rails) Regards, Andreas Kretschmer -- Andreas Kretschmer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-general mailing list (pgsql-general@post

Re: [GENERAL] Large pg_xlog

2016-09-26 Thread Andreas Kretschmer
On 27 September 2016 01:52:26 CEST, Francisco Reyes wrote: >Any ideas why pg_xlog is going so high? archive_command failed? If that happens the wal's will not deleted, you should see error-messages in the log. -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

Re: [GENERAL] We have a requirement to downgrade from PostgreSQL 9.5.4 to 9.5.2

2016-09-19 Thread Andreas Kretschmer
It is binary compatible, so yes. But trust me, there is problem with the new version. On 20 September 2016 06:00:59 CEST, KGA Official wrote: >Hi All, > >We are currently running at 9.5.2 and plan to upgrade to 9.5.4, but our >change requirement needs to plan for a downgrade with data >preservat

  1   2   3   4   5   6   7   8   9   10   >