Tag Info

New answers tagged

0

At 250/hour, all possible techniques are plenty fast. Anyway, I will throw my 2 cents in... Multi-row INSERT of 100 rows will run 10 times as fast as 100 individual INSERTs. Multi-row INSERT may lead to gaps in AUTO_INCREMENTs. In general, the command will preallocate all the ids it might need, then 'burn' the ones id did not use. (REPLACE them all dups ...


2

Don't install extensions to pg_catalog, because you don't mess with system catalog, ever. @Chris demonstrates one reason why. There are others. However, the "public" schema is in no way special. It's just the default schema that's pre-installed in standard distributions so we can get started right away. Some DB admins don't use the "public" schema at all, ...


1

Installing extensions into pg_catalog are, as far as I'm aware, not advised. You should use the default public schema, which is also in the search_path by default. Why? As an example, I will work with the pageinspect extension which I've already created within the public schema. All functions are, by default, accessible to all schemas in the database if ...


1

The best way, really, is for the web app to have no right to create or modify tables at all. It should only have the rights to do what it needs to do to perform its day to day functions, not administration. In particular, the web app must not run as a superuser and should preferably not own the database or tables. If the webapp has built-in administration ...


1

I'd say this is a good security practice to restrict OS access to your DB files. First you should definitely restrict write privileges to DB files at the OS level, if not already configured that way. Don't allow anyone other than the OS user that runs the DB to write to the DB files. Practically any DB software I can think of restricts this by default. ...



Top 50 recent answers are included