Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 2443

All versions of PostgreSQL. Add an additional version-specific tag like [postgresql-13] if that context is relevant.

3 votes

Why does adding a smallint column to a postgres query increase execution time 60X?

Short answer: You need a sightly larger work_mem. Try set work_mem in your session. Explanation: Compare these two step: -> Hash (cost=642.32..642.32 rows=25332 width=51) (actual time= …
J-16 SDiZ's user avatar
  • 327
1 vote

Migrate Oracle BLOB to Postgres BYTEA or OID

1) BYTEA. Because oid is an unrelated concept. 2) Work mostly out of box, see https://github.com/darold/ora2pg/issues/100 .
J-16 SDiZ's user avatar
  • 327
7 votes
Accepted

How does PostgreSQL handle Checkpoints in the middle of a WAL-enabled backup?

You asked: how postgreSQL will handle the recovery with a pg_data content containing some files which are inconsistent. pg_start_backup() ensure the data file is at least as new as the checkpoint. …
J-16 SDiZ's user avatar
  • 327
1 vote

PostgreSQL is using more memory than I'd expect

To quote http://www.postgresql.org/docs/9.5/static/runtime-config-query.html : This parameter has no effect on the size of shared memory allocated by PostgreSQL, nor does it reserve kernel disk cache …
J-16 SDiZ's user avatar
  • 327
0 votes
Accepted

In PostgreSQL, will VACUUM reset the dead tuple count (n_dead_tup in pg_stat_all_tables)?

Yes, it resets the value. But it is from the stats collector, not vacuum. postgres=# create table x (a int); CREATE TABLE postgres=# insert into x values (1),(2),(3),(4); INSERT 0 4 postgres=# delet …
J-16 SDiZ's user avatar
  • 327
1 vote

Recreate all foreign keys in all tables as deferrable (batch)

You can update the catalog tables directly. See http://www.postgresql.org/message-id/[email protected]
J-16 SDiZ's user avatar
  • 327
1 vote
1 answer
1k views

Postgresql INSERT triggers "0 row affected" workaround

In a INSERT trigger based table partition, insert always give "0 row affected". I think this problem is well know, it is even in the todo. Is there any workarounds for this issue in 9.4?
J-16 SDiZ's user avatar
  • 327
2 votes
1 answer
61 views

General purpose view for last value in a group

Is there any way to tell PostgreSQL these two query is equivalent and let it pick them automagically? …
J-16 SDiZ's user avatar
  • 327
0 votes
1 answer
2k views

TEMP table alternatives for pl/pgsql

I am trying to emulate MERGE behavior with pl/pgsql: -- Generate the data from funtion CREATE TEMP TABLE temp_x (id int, id2 int, data text, created_at timestamp, updated_at timestamp) ON COMMIT DR …
J-16 SDiZ's user avatar
  • 327