Re: pg_dump and public schema

2020-03-05 Thread Adrian Klaver
rest of the script can populate. The exception is the presence of the public schema. Obviously, at this point, there is nothing that tracks the presence of the public schema in the database being dumped and then drops it from the newly created version if it was not present in the original. 4

Re: format return of "age" to hh:mm

2020-03-05 Thread Adrian Klaver
;2020-03-05 01:40:32-05'::timestamptz - '2020-03-01 21:56:05-05'::timestamptz)) / 3600)::varchar || ':' || ((mod( extract( epoch FROM ('2020-03-05 01:40:32-05'::timestamptz - '2020-03-01 21:56:05-05'::timestamptz))::num

Re: Getting a error on creating a partition table index 12.2.

2020-03-05 Thread Adrian Klaver
=87259588d0ab0b8e742e30596afa7ae25caadb18 Thu, 25 Apr 2019 06:20:23 -0800 (10:20 -0400) That would encompass 12.1 also. Are you doing anything else to public.t_e20so1_doi prior to the above? -- Adrian Klaver adrian.kla...@aklaver.com

Re: Getting a error on creating a partition table index 12.2.

2020-03-05 Thread Adrian Klaver
ou on that. Someone with more knowledge of the internals will have to comment. For now the solution would seem to be not to specify the TABLESPACE if you want to use the default. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Getting a error on creating a partition table index 12.2.

2020-03-05 Thread Adrian Klaver
On 3/5/20 11:31 AM, Alvaro Herrera wrote: On 2020-Mar-05, Adrian Klaver wrote: On 3/5/20 10:04 AM, nikhil raj wrote: *CREATE INDEX t_e20so1_doi_c_doid_idx     ON public.t_e20so1_doi USING btree     (i_doid ASC NULLS LAST)     TABLESPACE pg_default;* *ERROR: cannot specify default

Re: What do null column values for pg_stat_progress_vacuum mean?

2020-03-06 Thread Adrian Klaver
column of the pg_stat_activity view to get more information on the session holding or awaiting each lock, for example SELECT * FROM pg_locks pl LEFT JOIN pg_stat_activity psa ON pl.pid = psa.pid; Thanks, Mark. -- Adrian Klaver adrian.kla...@aklaver.com

Re: duplicate key value violates unique constraint

2020-03-07 Thread Adrian Klaver
e to build gapless assignment by using exclusive locking of a table containing a counter; but this solution is much more expensive than sequence objects, especially if many transactions need sequence numbers concurrently." If you want that to happen you will have to roll your own implementati

Re: gdal version for Postgis 2.4?

2020-03-09 Thread Adrian Klaver
.rhel7.x86_64 gdal23-libs-2.3.2-8.rhel7.x86_64 -- Adrian Klaver adrian.kla...@aklaver.com

Re: libpq prepared statement insert null for foreign key

2020-03-09 Thread Adrian Klaver
 key yet? Ted -- Adrian Klaver adrian.kla...@aklaver.com

Re: How to discover what table is

2020-03-10 Thread Adrian Klaver
references "cad_digitacao". Hint Truncate table "rel_indicacao" at the same time, or use TRUNCATE ... CASCADE. -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html -- Adrian Klaver adrian.kla...@aklaver.com

Re: Streaming replication - 11.5

2020-03-10 Thread Adrian Klaver
u are taking the backup from. I had this issue last week as well in another DC and I had to reboot the slave to make it working (not sure why it helped) Do you know what can cause this? Thank you, Nicola -- Adrian Klaver adrian.kla...@aklaver.com

Re: Patterns to look for in the PostgreSQL server log

2020-03-10 Thread Adrian Klaver
depends on you. To get an idea of what the message levels are being triggered for take a look at: https://www.postgresql.org/docs/12/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHAT Table 19.1. Message Severity Levels -- Adrian Klaver adrian.kla...@aklaver.com

Re: How to discover what table is

2020-03-10 Thread Adrian Klaver
-archive.org/PostgreSQL-general-f1843780.html -- Adrian Klaver adrian.kla...@aklaver.com

Re: Streaming replication - 11.5

2020-03-10 Thread Adrian Klaver
 recovery restart point at 6424/1D7DEDE8 It is a cascade replication Il giorno mar 10 mar 2020 alle ore 15:58 Adrian Klaver mailto:adrian.kla...@aklaver.com>> ha scritto: On 3/10/20 2:26 AM, Nicola Contu wrote: > Hello, > I have two servers connected to the same s

Re: How to discover what table is

2020-03-11 Thread Adrian Klaver
name is not unique, be wary of code that uses this * for anything except preparing error messages. */ Going any further is going to need someone with more knowledge of the above to chime in. -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html -- Adrian K

Re: Streaming replication - 11.5

2020-03-11 Thread Adrian Klaver
LOG:  restartpoint starting: time Il giorno mer 11 mar 2020 alle ore 01:53 Adrian Klaver mailto:adrian.kla...@aklaver.com>> ha scritto: On 3/10/20 8:17 AM, Nicola Contu wrote: Please post to list also. Ccing list. What came immediately before the temporary file error?

Re: Streaming replication - 11.5

2020-03-11 Thread Adrian Klaver
disks on all servers Do you have before and after on CPU load, I/O throughput? Do system logs show anything relevant during replication drop out? Il mer 11 mar 2020, 18:57 Adrian Klaver <mailto:adrian.kla...@aklaver.com>> ha scritto: On 3/11/20 2:54 AM, Nicola Contu wrote: &g

Re: pg_restore restores out of order

2020-03-11 Thread Adrian Klaver
responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, distribution, review, copy or use of any of the information contained in or attached to this message is STRICTLY PROHIBITED. If you have received this transmission in error, please immedi

Re: Streaming replication - 11.5

2020-03-11 Thread Adrian Klaver
replication started failing. Trying to establish whether the former is causing the latter. Not sure what you are referring to in regards to server to be built? System logs don't show anything relevant unfortunately Il mer 11 mar 2020, 21:34 Adrian Klaver <mailto:adrian.kla...@aklaver.

Re: pg_restore restores out of order

2020-03-11 Thread Adrian Klaver
On 3/11/20 4:11 PM, Kevin Brannen wrote: Adrian Klaver wrote: On 3/11/20 2:46 PM, Kevin Brannen wrote: I'm working thru our system to upgrade from 9.6.5 to 12.2. One of the last things I'm verifying is backup/restore and it's failing for no reason I can figure out. So I'm

Re: Streaming replication - 11.5

2020-03-12 Thread Adrian Klaver
is a connection between changing to encrypting the disks and your issues. Not sure what, but to help how is the encryption being done and what program is being used? -- Adrian Klaver adrian.kla...@aklaver.com

Re: pg_upgrade 9.6 to 12 without 9.6 binaries

2020-03-13 Thread Adrian Klaver
some library conflicts in the past. Is there still a way to use pg_upgrade without the old (-b) binary set (I am aware of pg_dump/pg_restore)? No. As I understand it pg_upgrade needs to see the state of old instance to recreate that state on the new instance. Markus -- Adrian K

Re: Streaming replication - 11.5

2020-03-13 Thread Adrian Klaver
at os level. So the drives are encrypted with a password where the db saves data Il gio 12 mar 2020, 15:51 Adrian Klaver mailto:adrian.kla...@aklaver.com>> ha scritto: On 3/12/20 4:31 AM, Nicola Contu wrote: > The replicator is ok and the replicated as well.

Re: encrypt/decrypt between javascript and postgresql.

2020-03-13 Thread Adrian Klaver
ight result in half of the decrypted string. The paremeter after the key, 3rd parameter, it can be any string. That just changes the first part of the output, the garbage part. In decrypt_iv I tried using the encryption algorithm name in the javascript used to encrypt, but that gets me nowhere. I cannot see what i'm missing here. Thanks -- Adrian Klaver adrian.kla...@aklaver.com

Re: Reading WALs

2020-03-14 Thread Adrian Klaver
-- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html -- Adrian Klaver adrian.kla...@aklaver.com

Re: Reading WALs

2020-03-14 Thread Adrian Klaver
I can go back to production and see what´s could run better, if application, triggers and so on. -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html -- Adrian Klaver adrian.kla...@aklaver.com

Re: Exclude logging certain connections?

2020-03-15 Thread Adrian Klaver
recorded: [unknown]-[unknown]-2020-03-15 09:24:23.460 PDT-0LOG: connection received: host=[local] [unknown]-postgres-2020-03-15 09:24:23.460 PDT-0LOG: connection authorized: user=postgres database=test application_name=psql To me it looks like log_connections is all or none. Cheers, Paul -- Adrian Klaver adrian.kla...@aklaver.com

Re: unexpected chunk number 2 (expected 0) for toast value ... in pg_toast_18536

2020-03-15 Thread Adrian Klaver
st.html#STORAGE-TOAST-ONDISK "During an UPDATE operation, values of unchanged fields are normally preserved as-is; so an UPDATE of a row with out-of-line values incurs no TOAST costs if none of the out-of-line values change." Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80

Re: unexpected chunk number 2 (expected 0) for toast value ... in pg_toast_18536

2020-03-15 Thread Adrian Klaver
On 3/15/20 1:21 PM, Karsten Hilbert wrote: On Sun, Mar 15, 2020 at 12:58:53PM -0700, Adrian Klaver wrote: We then tried to DELETE the offending row delete from blobs.doc_obj where pk = 82224; but that, again, shows the "unexpected chunk" problem. According to

Re: Order by and timestamp

2020-03-15 Thread Adrian Klaver
nd you can loose much more money much more quickly... er... yeah. What this looks like on my end. Feel free to try and make sense of it yourself. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Order by and timestamp

2020-03-15 Thread Adrian Klaver
| 6f Hcap                  | 2016-09-30 14:10:00 | 27953255 | … …. regards -- Björn Lundin b.f.lun...@gmail.com <mailto:b.f.lun...@gmail.com> -- Adrian Klaver adrian.kla...@aklaver.com

Re: Invalid byte sequence errors on DB restore

2020-03-16 Thread Adrian Klaver
uot;: 0xa0  and invalid byte sequence for encoding "UTF8": 0xd7 0x20 This is on a pg 9.2.24 instance. Any tips to troubleshoot? What are the locale and encodings set to for the instance and databases in it? Regards, Samuel Smith -- Adrian Klaver adrian.kla...@aklaver.com

Re: psql crash on 9.6.16

2020-03-16 Thread Adrian Klaver
. If you are not the intended recipient, you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Order by and timestamp

2020-03-16 Thread Adrian Klaver
On 3/16/20 1:49 AM, Björn Lundin wrote: 16 mars 2020 kl. 01:37 skrev Adrian Klaver <mailto:adrian.kla...@aklaver.com>>: On 3/15/20 2:33 PM, Björn Lundin wrote: Hi! I have an old database that behaves a bit strange. I keeps horse races in UK/IE. I have a program that continuou

Re: Order by and timestamp

2020-03-16 Thread Adrian Klaver
On 3/16/20 1:51 AM, Björn Lundin wrote: 16 mars 2020 kl. 01:41 skrev Tom Lane <mailto:t...@sss.pgh.pa.us>>: Adrian Klaver <mailto:adrian.kla...@aklaver.com>> writes: On 3/15/20 2:33 PM, Björn Lundin wrote: I then did ’select * from AMARKETS order by STARTTS’ Is amarket

Re: Streaming replication - 11.5

2020-03-16 Thread Adrian Klaver
rhead. Il giorno ven 13 mar 2020 alle ore 16:15 Adrian Klaver mailto:adrian.kla...@aklaver.com>> ha scritto: On 3/13/20 4:11 AM, Nicola Contu wrote: > So in the logs I now see this : > > 2020-03-13 11:03:42 GMT [10.150.20.22(45294)] [27804]: [1-1] > db=[u

Re: Order by and timestamp

2020-03-16 Thread Adrian Klaver
;amarketsi6" btree (ixxluts) This gets it correctly. So it points to something on the first machine. Recreating indexes is a possibility, but (to me) a bit unintuitive since there are no index on startts I’ll do that tomorrow. -- Björn Lundin b.f.lun...@gmail.com <mailto:b.f.lun...@gmail.com> -- Adrian Klaver adrian.kla...@aklaver.com

Re: Order by and timestamp

2020-03-16 Thread Adrian Klaver
On 3/16/20 9:15 AM, Björn Lundin wrote: 16 mars 2020 kl. 16:46 skrev Adrian Klaver <mailto:adrian.kla...@aklaver.com>>: On 3/16/20 3:03 AM, Björn Lundin wrote: Yeah, it's hard to think of any explanation other than "the query used a corrupt index on startts to produce

Re: Order by and timestamp

2020-03-16 Thread Adrian Klaver
n Lundin b.f.lun...@gmail.com <mailto:b.f.lun...@gmail.com> -- Adrian Klaver adrian.kla...@aklaver.com

Re: psql crash on 9.6.16

2020-03-16 Thread Adrian Klaver
atement that ultimately crashed the session? -- Adrian Klaver adrian.kla...@aklaver.com

Re: Order by and timestamp

2020-03-16 Thread Adrian Klaver
On 3/16/20 2:50 PM, Björn Lundin wrote: 16 mars 2020 kl. 20:26 skrev Adrian Klaver <mailto:adrian.kla...@aklaver.com>>: Per Tom's comment, what are the encodings? Just sent reply to his mail with the encodings Also I would point out that the problem occurs on the machine yo

Re: Order by and timestamp

2020-03-16 Thread Adrian Klaver
hat r-pi produces every nigth And for completeness - b info from the pi bnl=# select version();                                                        version ------  PostgreSQL 9.6.10 on armv7l-unknown-linux-gnueabihf, compiled by gcc (Raspbian 6.3.0-18+rpi1) 6.3.0 20170516, 32-bit (1 row) *bnl@pibetbot*:*~ $*uname -a Linux pibetbot 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux -- Björn Lundin b.f.lun...@gmail.com <mailto:b.f.lun...@gmail.com> -- Adrian Klaver adrian.kla...@aklaver.com

Re: Order by and timestamp

2020-03-16 Thread Adrian Klaver
I stand corrected -- Björn Lundin b.f.lun...@gmail.com <mailto:b.f.lun...@gmail.com> -- Adrian Klaver adrian.kla...@aklaver.com

Re: Order by and timestamp SOLVED

2020-03-17 Thread Adrian Klaver
another version of psql. That would seem to imply psql changed something on the server and AFAIK sorting/ordering is done by the server not the client. Many thanks to Adrian and Tom -- Björn Lundin b.f.lun...@gmail.com <mailto:b.f.lun...@gmail.com> -- Adrian Klaver adrian.kla...@aklaver.com

Re: Keeping Admin-Owner user but creating new user with effective Admin-Owner access rights?

2020-03-17 Thread Adrian Klaver
isting roles to which the new role will be immediately added as a new member. (Note that there is no option to add the new role as an administrator; use a separate GRANT command to do that.) " Thanks -- Adrian Klaver adrian.kla...@aklaver.com

Re: Fwd: PG12 autovac issues

2020-03-17 Thread Adrian Klaver
> PG12. The configs and workload are essentially the same between versions. We realize we could simply increase the autovacuum_freeze_max_age, but that doesn't seem to actually resolve anything -- it just pushes the problem out. Has anyone seen anything similar to this? Thanks very much for the consideration. Justin King http://flightaware.com/ -- Adrian Klaver adrian.kla...@aklaver.com

Re: Order by and timestamp SOLVED

2020-03-17 Thread Adrian Klaver
(0x7fd35b046000) libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x7fd35ae3d000) Let me know, and I’ll mail you (privately) login details I am going to move the data, and I have the whole set of daily pg_dumps I need to set it up elsewhere. -- Björn Lundin b.f.lun...@gmail.com <mailto:b.f.lun...@gmail.com> -- Adrian Klaver adrian.kla...@aklaver.com

Re: Fwd: PG12 autovac issues

2020-03-17 Thread Adrian Klaver
On 3/17/20 3:48 PM, Justin King wrote: On Tue, Mar 17, 2020 at 5:39 PM Adrian Klaver wrote: On 3/17/20 3:22 PM, Justin King wrote: Apologies, I accidentally sent this to the pgsql-admin list initially but intended it go here: We have a database that isn't overly large (~20G), but

Re: Fwd: PG12 autovac issues

2020-03-18 Thread Adrian Klaver
r realtime is important in our environment. ** Also, it should be noted that the autovacuum_analyze_threshold is probably an incorrect value, we likely intended that to be 250 and just have now realized it after poking more at the configuration. -- Adrian Klaver adrian.kla...@aklaver.com --

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-19 Thread Adrian Klaver
t be serial column that has supplies the sequence numbers and therefore only one sequence in play. From what I see all you care about is that: group, element, event_id has an increasing event_id for (group, element) pairs. My question is how PostgreSQL will behave. Could it deal with millions of sequences? What about system operations as vacuum, etc? Pablo -- Adrian Klaver adrian.kla...@aklaver.com

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-19 Thread Adrian Klaver
oles” in the sequence. ... " -- Adrian Klaver adrian.kla...@aklaver.com

Re: Duplicate key violation on upsert

2020-03-20 Thread Adrian Klaver
 da_datum_x_acc_idx index, which is a partial index with jdata_a added as a covering column… that is, it’s only in the index so I can get some index-only results with that column. Is the partial index possibly an issue in this configuration? Thanks for any insight, Matt -- Adrian Klaver adrian.kla...@aklaver.com

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-20 Thread Adrian Klaver
wise, especially if your workload were actively hitting a lot of them concurrently.  It would work, for some value of "work", but it wouldn't perform very well. Also, as multiple people mentioned already, this still wouldn't guarantee gap-free sequences of ID values.                         regards, tom lane -- Adrian Klaver adrian.kla...@aklaver.com

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-20 Thread Adrian Klaver
On 3/20/20 9:59 AM, Adrian Klaver wrote: On 3/19/20 10:31 PM, pabloa98 wrote: I see. Any suggestion? It should behave like a sequence in the sense that concurrent transitions will get different numbers from this alternative sequence like solution. In our case, we will need to do a call

Re: Duplicate key violation on upsert

2020-03-20 Thread Adrian Klaver
On 3/20/20 11:34 AM, Matt Magoffin wrote: On 21/03/2020, at 4:00 AM, Adrian Klaver <mailto:adrian.kla...@aklaver.com>> wrote: On 3/20/20 2:17 AM, Matt Magoffin wrote: Hello, Indexes:     "da_datum_pkey" UNIQUE, btree (node_id, ts, source_id) CLUSTER, tab

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-20 Thread Adrian Klaver
w that. So he needs per-element counters. I must have missed that post. There was this(and alternates): CREATE TABLE counter( group INT NOT NULL, element INT NOT NULL, seq_number INT NOT NULL default 0, CONSTRAINT PRIMARY KEY (group, element) ); Nothing I saw that said int could not become

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-20 Thread Adrian Klaver
On 3/20/20 2:13 PM, pabloa98 wrote: On Fri, Mar 20, 2020 at 10:26 AM Adrian Klaver mailto:adrian.kla...@aklaver.com>> wrote: On 3/20/20 9:59 AM, Adrian Klaver wrote: > On 3/19/20 10:31 PM, pabloa98 wrote: >> I see. >> >> Any suggesti

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-21 Thread Adrian Klaver
not block, generate few gaps (and those gaps are small) and never generate collisions then I will happily use it. I hope I described the problem completely. Pablo -- Adrian Klaver adrian.kla...@aklaver.com

Re: Explain says 8 workers planned, only 1 executed

2020-03-21 Thread Adrian Klaver
"postgres: parallel worker" proceses in top and when executing from my function just a single "postgres: $user $db $host($pid) SELECT" processes. Best regards, Alastair -- Adrian Klaver adrian.kla...@aklaver.com

Re: Duplicate key violation on upsert

2020-03-21 Thread Adrian Klaver
On 3/20/20 1:32 PM, Matt Magoffin wrote: On 21/03/2020, at 8:10 AM, Adrian Klaver <mailto:adrian.kla...@aklaver.com>> wrote: The _hyper_1_1931_chunk_da_datum_x_acc_idx index has the same definition as the da_datum_x_acc_idx above (it is defined on a child table). That is, they

Re: Duplicate key violation on upsert

2020-03-21 Thread Adrian Klaver
On 3/21/20 11:05 AM, Adrian Klaver wrote: On 3/20/20 1:32 PM, Matt Magoffin wrote: On 21/03/2020, at 8:10 AM, Adrian Klaver <mailto:adrian.kla...@aklaver.com>> wrote: The _hyper_1_1931_chunk_da_datum_x_acc_idx index has the same definition as the da_datum_x_acc_idx above (it is def

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-21 Thread Adrian Klaver
lues from multiple columns in the same table. Pablo -- Adrian Klaver adrian.kla...@aklaver.com

Re: Duplicate key violation on upsert

2020-03-22 Thread Adrian Klaver
On 3/21/20 2:45 PM, Matt Magoffin wrote: On 22/03/2020, at 8:11 AM, Adrian Klaver <mailto:adrian.kla...@aklaver.com>> wrote: I was thinking more about this: "INSERT INTO solardatum.da_datum(ts, node_id, source_id, posted, jdata_i, jdata_a, jdata_s, jdata_t) VALUES (…) ...

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-22 Thread Adrian Klaver
ld prefer to have something more resilient to developers/programming errors, if possible. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-22 Thread Adrian Klaver
as asking is what locking where you doing? And it might be better to ask the list how to solve those problems, then to create a whole new set of problems by using millions of sequences. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Duplicate key violation on upsert

2020-03-22 Thread Adrian Klaver
On 3/22/20 2:48 PM, Matt Magoffin wrote: On 23/03/2020, at 9:44 AM, Adrian Klaver <mailto:adrian.kla...@aklaver.com>> wrote: Is there a chance the BEFORE trigger functions are doing something that could be leading to the error? In the error log is there a line with the actual va

Re: Loading 500m json files to database

2020-03-23 Thread Adrian Klaver
write to 10 different tables instead of 1) Any ideas? -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html -- Adrian Klaver adrian.kla...@aklaver.com

Re: Loading 500m json files to database

2020-03-23 Thread Adrian Klaver
| | no indexes, constraints or anything else -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html -- Adrian Klaver adrian.kla...@aklaver.com

Re: Loading 500m json files to database

2020-03-23 Thread Adrian Klaver
COPY functions: https://www.psycopg.org/docs/usage.html#using-copy-to-and-copy-from -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html -- Adrian Klaver adrian.kla...@aklaver.com

Re: Duplicate key violation on upsert

2020-03-25 Thread Adrian Klaver
On 3/25/20 5:23 PM, Matt Magoffin wrote: On 23/03/2020, at 1:10 PM, Adrian Klaver <mailto:adrian.kla...@aklaver.com>> wrote: So the query is in the function solardatum.store_datum()? If so what is it doing? Yes. This function first performs the INSERT INTO the solardatum.da_da

Re: Duplicate key violation on upsert

2020-03-26 Thread Adrian Klaver
On 3/25/20 5:23 PM, Matt Magoffin wrote: On 23/03/2020, at 1:10 PM, Adrian Klaver <mailto:adrian.kla...@aklaver.com>> wrote: So the query is in the function solardatum.store_datum()? If so what is it doing? Yes. This function first performs the INSERT INTO the solardatum.da_da

Re: How can I recreate a view in a new schema such that the view def references tables in the new schema ?

2020-03-26 Thread Adrian Klaver
you want to move the underlying tables just by specifying a search_path. Thanks in Advance. -- Adrian Klaver adrian.kla...@aklaver.com

Re: How can I recreate a view in a new schema such that the view def references tables in the new schema ?

2020-03-26 Thread Adrian Klaver
rt of global replace of "public." with "myschem." in the output of pg_dump, maybe with sed or something.  But even after explicitly using "public.", it didn't stick in the view def. Can we see an example view definition? On Thu, Mar 26, 2020 at 1:34 PM

Re: Ident authentication failed

2020-03-26 Thread Adrian Klaver
s  trust # "local" is for Unix domain socket connections only local   all all peer # IPv4 local connections: host    all all 127.0.0.1/32 trust I'm at a complete loss. Any suggestions? Thanks, Ted To -- Adrian Klaver adrian.kla...@aklaver.com

Re: Ident authentication failed

2020-03-26 Thread Adrian Klaver
uot;local" is for Unix domain socket connections only local   all all peer # IPv4 local connections: host    all all 127.0.0.1/32 trust I'm at a complete loss. Any suggestions? Thanks, Ted To -- Adrian Klaver adrian.kla...@aklaver.com

Re: How can I recreate a view in a new schema such that the view def references tables in the new schema ?

2020-03-26 Thread Adrian Klaver
project, wa.wa_path, (( SELECT max(fse.end_datetime) AS max            FROM flow_step_events fse           WHERE fse.sqf_id = sr.sqf_id)); sqf=> You can see the "public." refs in the create view, but not echoed in the stored view def. See this post: https://www.postgresql.org/message-id/31367.1572815723%40sss.pgh.pa.us -- Adrian Klaver adrian.kla...@aklaver.com

Re: Ident authentication failed

2020-03-26 Thread Adrian Klaver
ADDRESS METHOD local   miniflux   miniflux  trust local   miniflux   postgres  trust # "local" is for Unix domain socket connections only local   all all peer # IPv4 local connections: host    all all     127.0.0.1/32 trust I'm at a complete loss. Any suggestions? Thanks, Ted To -- Adrian Klaver adrian.kla...@aklaver.com

Re: Postgres 12 backup in 32 bit windows client

2020-03-28 Thread Adrian Klaver
this backup? Do you have shell access to the Debian machine in order to do the backup there? Andrus. -- Adrian Klaver adrian.kla...@aklaver.com

Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore

2020-03-28 Thread Adrian Klaver
me settings: Latest Postgres 12  is used OS and database locales are  Estonian Database encoding is UTF-8 Andrus. -- Adrian Klaver adrian.kla...@aklaver.com

Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore

2020-03-28 Thread Adrian Klaver
arlier, in the Postgres instance on Windows what does \l show for template0? Andrus. -- Adrian Klaver adrian.kla...@aklaver.com

Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore

2020-03-29 Thread Adrian Klaver
I'm guessing it is picking up Estonian_Estonia.1257 from the system. The Windows Postgres instance was installed from the EDB installer? postgres=CTc/postgres (1 row) Andrus. -- Adrian Klaver adrian.kla...@aklaver.com

Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore

2020-03-29 Thread Adrian Klaver
ltibyte.html#id-1.6.10.5.7 There is a conversion for 1257 clients so having your console run as 1257 should solve the problem. Someone with more current experience on Windows will need to comment on whether that is the viable or best solution. Andrus. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Hot standby from Debian to Windows

2020-03-29 Thread Adrian Klaver
servers? 4) How are you going to deal with the down server and how do you plan on bringing it up again? Andrus. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Hot standby from Debian to Windows

2020-03-29 Thread Adrian Klaver
. I will then manually synchronize two clusters when users continue to enter data, this is not time critical. Would it not be easier to just set up another Debian server, run binary replication and put them behind something like pgpool? Andrus. -- Adrian Klaver adrian.kla...@aklaver.com

Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore

2020-03-29 Thread Adrian Klaver
= -1; If new database is created manually in windows cluster the following command is generated: CREATE DATABASE mydbmanually    WITH    OWNER = mydbmanually_owner    ENCODING = 'UTF8'    LC_COLLATE = 'Estonian_Estonia.1257'    LC_CTYPE = 'Estonian_Estonia.1257'    TABLESPACE = pg_default    CONNECTION LIMIT = -1; Andrus. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Uploading existing shapefile from geoserver to postgresql

2020-03-30 Thread Adrian Klaver
-- Adrian Klaver adrian.kla...@aklaver.com

Re: Hot standby from Debian to Windows

2020-03-30 Thread Adrian Klaver
example: https://www.pgpool.net/docs/latest/en/html/example-watchdog.html Andrus. -- Adrian Klaver adrian.kla...@aklaver.com

Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore

2020-03-30 Thread Adrian Klaver
sing pg_restore without manually changing anything. So was this the same for the database you originally posted about, it actually restored it just threw warnings? If so I misunderstood the situation and thought the database was not loading. Andrus. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Hot standby from Debian to Windows

2020-03-30 Thread Adrian Klaver
replication work in this case. Take a look at: https://www.postgresql.org/docs/12/warm-standby.html#STANDBY-PLANNING It is not specifically ruled out, nor is it is explicitly ruled in. Myself, I would not bet on it being stable. Andrus. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Hot standby from Debian to Windows

2020-03-30 Thread Adrian Klaver
On 3/30/20 11:36 AM, Adrian Klaver wrote: On 3/30/20 11:06 AM, Andrus wrote: Hi! Got it. Just thought it would be easier not to have to deal with cross OS issues. Here is one example: https://www.pgpool.net/docs/latest/en/html/example-watchdog.html Hopefully Windows Hyper-V virtual network

Re: pgAdmin4 installation on macOS installed a User: can I delete it?

2020-03-31 Thread Adrian Klaver
led a User on the Operating System. Can the User be deleted? Did you install pgAdmin4 alone or as part of a Postgres server install? -- Adrian Klaver adrian.kla...@aklaver.com

Re: migrate off oracle data to postgres

2020-03-31 Thread Adrian Klaver
On 3/31/20 8:51 AM, Pepe TD Vo wrote: I have tables ddl data definitions already.  Only need to move the data over off Oracle to Postgres PostgreSQL Foreign Data Wrapper for Oracle: http://laurenz.github.io/oracle_fdw/ -- Adrian Klaver adrian.kla...@aklaver.com

Re: permission denied for schema

2020-04-01 Thread Adrian Klaver
e user based on a master user, then should it not have all rights as the master user as created above? Or Do I need to do a bunch of individual GRANTS still? Thanks -- Adrian Klaver adrian.kla...@aklaver.com

Re: pgAdmin4 installation on macOS installed a User: can I delete it?

2020-04-01 Thread Adrian Klaver
r that the above run as. If you are not actually using the Postgres server and its tools then you could uninstall them and I would guess the user would be uninstalled also. Thanks *Sent:* Tuesday, March 31, 2020 at 10:30 AM *From:* "Adrian Klaver" *To:* "Dummy Account" ,

Re: dbeaver

2020-04-01 Thread Adrian Klaver
- does dbeaver is a good frontend for pg administration? I use the Postgres client psql for administration. I rarely use GUI frontends so I can't comment on DBeaver. Roberto Della Pasqua www.dellapasqua.com -- Adrian Klaver adrian.kla...@aklaver.com

Re: R: dbeaver

2020-04-01 Thread Adrian Klaver
gresql.org/docs/12/planner-stats-details.html I would try the query first and if you see issues then post here with the EXPLAIN ANALYZE results. Does PG support in-memory tables (disk persisted) as MSSQL? That will have to be answered by someone with more knowledge of MSSQL then I.

Re: too many clients already

2020-04-02 Thread Adrian Klaver
ocal] idle Thanks Danny -- Adrian Klaver adrian.kla...@aklaver.com

Re: too many clients already

2020-04-02 Thread Adrian Klaver
count(*) from pg_stat_activity is only 66. Thanks Danny Lots of idle, kept-alive clients? Do you have a connection pooler (e.g. pg-bouncer)? -- Adrian Klaver adrian.kla...@aklaver.com

Re: too many clients already

2020-04-02 Thread Adrian Klaver
On 4/2/20 8:35 AM, Abraham, Danny wrote: Big installation: max_connections is 1200, shared_buffers is 2GB Have you confirmed that the above is actually in effect by doing?: show max_connections; -Original Message- From: Adrian Klaver Sent: Thursday, April 02, 2020 6:30 PM To

Re: Cstore_fdw issue.

2020-04-02 Thread Adrian Klaver
dline -lrt -lcrypt -ldl -lm VERSION = PostgreSQL 12.1 Thank You, Moses -- Adrian Klaver adrian.kla...@aklaver.com

<    9   10   11   12   13   14   15   16   17   18   >